@PartyPartyYeah I am so sorry to hear about what has happened. You must be heartbroken.
It is a classic thing for a man to try to blame their partner/ wife when they leave though, to ease their own conscience about what they are doing. It's very easy with us because we are quite impressionable to convince us it's all our fault. We are just a terrible person, impossible to live with. I suspect you may well, in time, realise this is not the truth of the situation.
But that doesn't make it any less painful, I know.
It sounds trite I know (believe me!) but just get through each day. That is all you can do at first. Don't entertain any discussion with him, it will make it worse for you.
If he had become so unhappy he needed to leave why had he not discussed it with you until now, before it got to that point? Where was his effort to communicate how he was feeling and work together on a way forward?
It sounds like the script to me, I am afraid. "It's all you, you're just unbearable to live with". So unbearable that he stayed married to you for 20 years? And the poor soul was too terrified to talk to you about it? I don't believe it at all.
I am so sorry you are going through this. Two people are in a relationship. This is NOT all your fault. He is the one that has blindsided you and sprung this on you and is now trying to blame you so he doesn't feel guilty about what he is doing.
You will be ok in time, I promise. I know it sounds like nonsense to you now, but you will. We are all here for you. 