Re: Hope to get the thoughts out of your head
I will tell you something my IC told me that helped me in a similar situation. She said that the intrusive thoughts will come. You have no power over whether or not they will come. You do decide how long to let them linger.
So when they come, you have to be aware, on alert, and instantly shut them down. Once you are conscious that the thoughts are beginning to play out, you shut it down. Immediately. No dwelling on them. No letting them play out. This you can control. The more you do this the better at it you will become and the less often the thoughts will come at all.
There is a saying, pain is unavoidable, suffering is optional. You will feel pain, lots of it, often, and for a long time. But dwelling on these thoughts is suffering. You don't have to do that.
Of course, as other have suggested, it is important to cut all contact with your wife. Regardless of residual feelings you have for her. Regardless of some tangential benefits you may draw from remaining in contact. Your best course of action is to shut her out 100%. Not out of spite or anger but out of self protection. You can tell her that and ask her to respect that you need this. Then enforce it whether or not she cooperates.