I totally understand where you’re coming from with this - it’s 7 years since my exH had an affair with a women 14 years younger than me, and then did a right number on me - it was all my fault, blah, blah,blah...
It does mess with your head and it took me a good couple of years to work through how much it had affected my self esteem. There are still vestiges of that left now, but time is the healer and you keep on pushing through.
It is not a reflection of you. It just demonstrates what a weak, pathetic and selfish man he is. Even if he was unhappy with you, he had the option to talk to you and either work on it, or leave you, without someone else to go to.
I know you don’t feel inspirational or admirable - I’ve lost count of the times people have told me this and I’m thinking that I’m barely holding on by my fingertips. Same thing - knackered, lonely.
The only thing I can suggest, that works for me - see your friends regularly. Accept that you will have bad days/weeks - they won’t last forever. Counselling helps if you can do it.
And you are amazing - you may not feel it. But you are - even if you’re shattered, lonely etc, you’re still getting through each day and that is something to be proud of after what you’ve been through.
Are you getting enough time to yourself?