Hi, I'd like to help you with your question.
I am familiar with this problem. The issue with affairs and pornography is rarely obsessive behavior but rather esteem, self confidence and also fear based emotional behaviors. In many men, these emotions remain hidden and for the most part are taken out on their wives, through affairs, pornography and other self destructive behaviors. There is an emotional thrill associated with self destructive behaviors and that often affects the man's ability to stop. These become true addictions with both physical and emotional ties to the behavior. Simply stopping the behavior will not be enough for they will return unless healthier behaviors are designed to take their place.
To help solve this problem, you need to take steps to understand then free yourself from this issue. One, you must, under no circumstances have any type of contact with this other person. Your wife will not only see it as a betrayal, but you will undermine any recovery for yourself.
Two, understand where the behavior comes from. This is an emotional issue that must be addressed as such. Find out about your emotional need to pursue destructive behaviors and start working to replace the emotional issues with ones that are good for you and your marriage. A therapist, or if you attend church your pastor, could help you with this step. Attend with your wife but if she will not go, go alone. You need to resolve the root of this problem before you can move on and repair your marriage.
Three, there are two websites that I highly recommend. One is called Settingcaptivesfree.com and the other is Marriagetoday.org. Both of these have wonderful support for men and their wives to start working on your emotional issues and the relationship.
Work with your wife to rebuild trust. Be open about every thing. Tell her about the steps you are taking in recovery, any discoveries you make about why the behaviors occurred, and do what you can to be there for her. Account for your time away from her, not every minute, but enough where she is reassured that you are where you say you are going to be. Answer any questions she has about the affair, even if they are uncomfortable. This will rebuilt her trust and also make sure she is not left out of anything you experienced. Even though it is hard, it shares with her every part of what you are both going through and that will go a long way to helping to repair your relationship.
I hope this has helped you,
Depression can cause individuals to feel self destructive.
In many cases depression is not genetic or biochemical but rather internalized emotions, especially anger, disappointment and hurt. You are correct, your "control" of your emotions may have hurt you more than you might have known. Yes, the websites will help you with the behavioral part of your problem. However, the emotional source of the problem will need to be worked out with a therapist. Most men like cognitive behavioral therapy (CBT) as it is fast, efficient, and does not require you to go into long, drawn out detail. However it will access your feelings and help you deal with any unresolved issues. Your family doctor can make a referral to a CBT counselor in your area as they often know the best local resources.
A good therapist will not criticize either one of you. I would suggest talking with you wife about making an agreement that if the therapist makes either one of you uncomfortable, that you will seek out another. Therapy and therapists are a lot like physicians. Skills and talents vary and not all fit everyone.
If you maintain any contact with the other woman, yes, it is an affair of the heart. The only way to repair your marriage is to agree to completely eliminate all possible contact. This issue is very powerful and I would suggest not talking about it with your wife until you see a therapist and find some good ways to broach this topic without hurting her.