You can't spend years in a certain dynamic with someone and fix it as if they were a car-part that's malfunctioning. Experiences leave a mark, and once someone views you differently, then it's very difficult to un-do that. You are simply not the person they thought you were, and so are left trying to piece together what they now think of you, based on all that new information. Some people can love and trust that new person, but many can't, as they wouldn't never have chosen to settle down with that new person if they'd had the choice, all those years ago.
This progressed to adding women on social media accounts I was attracted to. I don’t know why I did this, I just wasn’t thinking
One of the first steps to self-development is being honest with yourself.
I don't believe that you don't know why you did this.
I think you do know, but you're glossing over it with a much-used 'I didn't know why I did it' in order to make it more palatable to yourself. I think you're ashamed of this, or your ashamed of what others might think of it, and you're trying to hide from that shame by not being honest with yourself.
People do add things on social media as a sort of bookmark to come back to it later, but I think men add women like this on social media because there's a tiny part of them that wants to be noticed by those women, to feel like they are part of of these beautiful women's circle in some way.
There's contradictions in what you say.
You say you've been rejecting your wife frequently over the years, but maintain you're attracted to her. Unless someone was sexually abused, this doesn't usually happen.
This leads me to think that yes, maybe you are/were attracted to your wife, but that quite simply, porn was better and easier.
It gave you the stimulation you needed, with a catalogue of multiple women, at any time you needed it. You were able to select women who looked like your wife, or total opposite, of a wide age range, and unlike your wife, none of them would expect anything from you, no mutual sexual pleasure.
I'm trying so hard to be a good husband to her
Although this sounds admirable on the surface, this is part of the problem I'm afraid.
Someone shouldn't have to try that hard to be a good husband. Maybe it should be in the back of their minds as a value they want to stick to, but it should be something that's second nature. If it isn't, then it's not who you are on the inside, and as such you're vulnerable to slipping back to how you naturally are, and she knows that.
Imagine someone saying 'I'm trying so hard to love her', or 'i'm trying really hard not to cheat'.
If you have to try that hard to love someone.....then is that a sustainable, stable thing for the future?