I note you put all the blame on your ex wife for wanting your attention. (Cheating was a wrong way of dealing with the problem) All too often men once they get married, have the wife and kids, get wrapped up in their careers, hobbies etc and the wife may tell them that she is feeling lonely, unloved, lack of emotional connection etc but all too often it falls on deaf ears for years and years. Why didn't you take the emotional temperature of your first marriage? Sometimes men are lazy creatures and don't bother doing anything until the **** really hits the fan but then it is too late.
For years i told my husband i felt abandoned and alone due to his work and drinking and he didn't bother changing. He even had the attitude what was I going to do or where was I going to go as I had kids and he knew I wouldnt break up the family. Now he knows different cause I could walk in a heart beat. Why do men let it get to that stage? I know I'll get some brick bats for this but I see it happen time and time again. Is it because the woman is not attractive if she wants her needs met?
As a man I don't think you are wrong at all, I think this contributes to some of the cheating and heartbreak we see, though that is no excuse, woman should leave and not cheat, once there is cheating the high road is lost and the wives who cheat are much worse.
I am not speaking for you husband here as I don't know him but I will say in general, many men were not taught that we need to provide emotionally for our wives just as much as financially. This is similar to how many woman don't understand how sex is an emotionally bonding act for lots of men. Sex for men is how we express love in a lot of ways. The genders are different even though for the last 20 years the general thought has been we are not that different. In this respect we are. If both sexes understood and excepted this about each other we would have much better relationships.
So back to my theory, men are NOT taught that they need to emotionally provide, and in many cases they are not given the tools how to do that in the first place. If you have never been taught to talk about your emotions or worse been taught that emotions are not to be talk about because it makes you weak, it is very hard to just change and learn to do this. Now this doesn't mean that some men aren't just selfish, of course some are, but I know many think when they go out and work hard that they are fulfilling there role as a provider and husband and that's it. I also think when some guys wives tell them they are feeling a lack of emotional connection to them it's like saying - "my transmission is dead" to someone who doesn't know anything about cars. They are like, what the hell do I know about that. They don't know how to even ask. Besides they are not supposed to ask because that makes them look weak. They feel powerless to fix it. So they just get mad or shrug.
Think about it before the advent of the industrial revolution getting food on the table really was about life and death. So when the man spent all his time doing that, damn straight he was doing his job. We are kind of still stuck in this mentality. Today our lives are different woman can support themselves getting food on the table most often is done by both partners. Culture is just catching up to this fact in many ways. If you have sons teach them this, my mother taught me and I am a better husband because of it. My Dad didn't say a think about this to me. He doesn't get it, he is a product of his generation. I was lucky enough to have a resource in a mother who asked me what was I feeling and told me to talk about them. She would always tell me when you get married you can't go to your room when you get home like you do now. You need to talk to your wife, she needs that from you. I was well aware that emotional protection and provision was my responsibility to her.
Anyway my = 2 cents.