This is specifically the case for my husband. We have been going to therapy together and him individually to work through many of his issues. He has struggled with low self-esteem for a very long time. It stems back to his childhood. He says that the woman he chose to cheat with were below him, so to speak. He says that it made it easy for him to get their attention and they told him all of the things that he thought he needed to hear. The problem is that that good feeling never lasted for more than the encounter and made his self-esteem and self-loathing and anxiety increase. He is working on this. He is working on how to fix these broken areas of himself so that he can be a better person. No one can fix it for them, but themselves. I firmly believe that once he was able to admit to himself that he has these issues and accept them and not use it as an excuse or justification for cheating, he has put himself on the right path.