This is going to sound mean, and I don't mean to be cruel but....honey, he's treating you the way you allow him to treat you. He's cheated, you've stayed...he's had a child by two other women, you've stayed...he's brought someone else into your home (into your bed) more than once, you've stayed...he's beaten you, you've stayed. Of course there's nothing wrong with the M from his perspective, he's getting absolutely everything he wants....but he's not treating you respectfully in this M.
He's repeatedly cheated...and you are still there....so, what have been the consequences of him cheating and fathering children by other women?
Hon, I'm so not surprised you have self-esteem issues. This man is presenting you with a crap-sandwich and expecting you to like it. The thing is though, you're eating it. You may not like it, but you are eating it. You know he's treating you badly and deep down...you know you deserve much better than this (even if yo udoubt it there's a part of you telling you that you deserve better)...therefore your self-esteem starts taking a nosedive...especially after 20 years of this treatment.
In many ways you aren't treating yourself very respectfully either, you aren't expecting better treatment for YOURSELF...much less demanding better from the man who is supposed to cherish you above no other....and you do deserve to be treated so much better!
One thing I suggest to get your self-esteem back....is to do something for YOU and remove yourself from this situation ASAP. Sometimes it takes drastic measures for someone to snap out of it so-to-speak. You leaving, will show him you aren't going to tolerate this any longer....and it will give you the space/time to rebuild the wonderful woman within you. Sign up for some classes that interest you, get a job of some sort (if you don't already have one)....join clubs that interest you. But remove yourself from that situation and go to IC. Find yourself a really good IC that will help you figure out why you would stay in this situation and help you rediscover your strength.
I have this very strong suspicion that if you can give yourself time/distance from him...even you are going to wonder why you've dealt with this for so long....and you are going to feel sooooo much better...mentally & physically.
I know that's probably not what you are wanting to hear. I would love to say that you can work on this without him...but this is an instance where I don't see that happening. Not unless you can be happy in a M where it's not just the two of you.