@Filly2011 you will get over this in time. I was with my ex for 28 years married for 26 when he had an affair with a 25 year old employee! They are together now and we've been separated for nearly 4 years but still not divorced due to him trying to keep as much of our joint assets to himself.
The thing that helped me the most was counselling. I had 3 months of weekly sessions with a hypno-psychotherapist which really helped break the emotional connection for me. It also helped me to get my head around the reasons why I'd put up with some fairly shocking behaviour from him (he's a narcissist and my mother is one too although not as bad so when I met him I was used to pandering to her and thought his behaviour was normal).
I want to say, my ex also slept with ow in my bed and had her stay in my home whilst I was on holiday with our daughters. It is disgusting behaviour from both of them and so disrespectful that it gave a clear indication of what sort of people they really are.
I do get where you are coming from feeling you have wasted half your life (sunken costs fallacy) but the positive thing is you need waste no more of it on that sad bastard. He has treated you appallingly whinging to you about how sad his life is. The best thing you could do would be to stop talking to him get divorce papers issued and move on with your life.
I am much happier without my ex and have been ever since the shock of what he'd done wore off and the counselling started to help me move on. Btw it is essential to find the right counsellor for you, the one who helped me was the second one I went to, who I felt really understood and helped me work through things.
I met someone else 18 months after we separated and I'm much happier and feel I can be truly myself. There is a whole new life out there for you to live.