Hello, I am Rafael. Thanks for asking your question - I'm here to support you. (Information posted here is not private or confidential but public).
I am sorry to know this problem has undermined your marriage this much, but feel hopeful to know you acknowledge the problem and have decided to take concrete actions to make changes, leading to healing the relationship and growing from past mistakes.
Could you please tell me a little more about this issue? For how long have you been doing this and are you aware of the roots of it?
You said that you think it could be because you look for attention from women what fuels these behaviors. ... I see. then how do you feel when you are not doing it?
For how long have you been married and if this has been present for the whole duration of your marriage, have you been presenting this issue for all this long?
I see, then in the past whenever you did not engage in these behaviors, your mood used to be depressive...
The she has been tolerating them all these time regardless the lack of improvement?
This is all about talking with women, never physical encounters but being romantic and sexual during those chats, right?
I see. What you describe here seems to be related to what is known as love & sex addiction. It could be much more of one or the other, but the patterns are the same, you know it is unhealthy and leading you to sabotage your marriage but you still find yourself unable to stop.
The "high" you get from the attention, the intensity of these interactions is what could give you this empowering sense of satisfaction and fulfilling, perhaps also of relief from anxiety and depression, and it seems you have been suffering from these disorders from long ago, which could have made it even harder for you to control them.
Then you would need to address it as what it is, an addiction if what you truly want is to rehabilitate from it.
You have literally programmed your mind and body to react the way they do, and found n these behaviors a way to experience relief, a sense of control and fulfillment to boost your mood, so not to feel overwhelmed by depression and perhaps by anxiety too.
This is why addictions could develop and get this strong, getting deeply rooted in your psyche and body, making it overwhelming to face them.
It is an old issue rooted in past problems, and whenever you may experience extra stress from work, family, finances or any other area you consider as important in your life, the addictive behavior appears as the immediate means to experience instant and powerful sense of relief, control and fulfillment, the problem is that the numbing effect goes away, leaving you facing reality, and there is when you look for more of it.
The most realistic way to have a good chance to rehabilitate from this or other addictions is through consistent psychotherapy. Sex & love addictions feeds from your depression and anxiety problems, and as long as they were not addressed, the addiction would remain and grow. Behind depression and anxiety you would find your life experiences-issues from where they developed, thus psychotherapy should address those issues and work on resolving them, while helping you to develop effective coping skills, anxiety management and assertive ways of getting real instead of fake relief and sense of fulfillment.
Then you would need to find a competent and experience psychotherapist with expertise in love & sex addictions, depression and anxiety disorders for individual psychotherapy and from there work on finding group therapy for the same. If there are no therapy groups for these problems where you live, then at least you would need to join a support group, and it would complement individual psychotherapy, providing the best chances for rehabilitation.
This is not an easy nor short task, but a long term process, we are talking about rehabilitation, so it is tough and requires a lot of hard work, full accountability and commitment to work on yourself and concrete chances, being %100 honest with yourself and towards those who care about you, for this to work. It is tough but necessary and absolutely worthy.
You're welcome. Please do not delay getting necessary psychotherapeutic support as soon as possible and stick to it to create the personal and marital life and fulfillment you need and deserve.