Anticipate behaviors that will make you feel guilty. To break the chain of embarrassment and lying, it's important to learn to anticipate things that you'll likely feel guilty about in the future, and avoid those behaviors. When you lie, you're covering up some uncomfortable truth that's more easily couched in a lie. You can either get comfortable with the truth, or abandon the behavior that makes you embarrassed.
If you smoke cigarettes, you won't have to lie if everyone knows it's true. Own up to it. If a behavior is un-own-upable, it's probably best to avoid it. It would be humiliating for your wife to find out that you had an inappropriate relationship with a coworker, but you won't have to lie if you don't do it.