I understand how you feel. Having someone close to you leave is the worst feeling in the world. The blame and the self hatred that comes after, it's such a horrific feeling. Whatever drug courses through the human brain while in love, it has the most debilitating withdrawals imaginable. I wouldn't wish it on my worst enemy.
When you love someone, it's about loving the person, not the relationship. To love 'you' more than 'us'. You talked about wanting to get better for her. But if she wanted you to get better, I don't think it was for 'us', I think she wanted you to get better for you. Like how does phrase 'I'd sacrifice myself a million times to make you happy' even make sense in a world where the primary driver of love isn't a desire to make the other person happy, or more specifically, the belief that another person is fundamentally worthy of happiness. And that belief, it can go deeper then even the belief that you can make that person happy. That's why it's possible to leave someone you love, to leave someone who you think is deeply worthy of happiness, it's cause the choice to leave is more about your ability to make each other happy than it is about what your partner deserves.
So if she made you want to get better, if she made you want to have a future, then nothing has really changed. She thought you were worthy of happiness, and I bet you don't think she was unwise. If you're growing, if you're fighting, if you're worthy, then while it hurts to lose her, all the good parts of you that she loved are still right there. And I know her leaving sucks, but ultimately what we carry of people run deeper than just their presence in our lives, it's also in the lessons learned from them.
So I agree with you, this fucking sucks. A partner leaving your life is no small thing. They're a person you grow used to relying on, and having that crutch swept out from under you sucks. But the self loathing is something separate, and I think if there's anything you should cling to, it's the idea that if she thought you were worthy of her love for those 5 years, then you must be worthy of your own love right now.
Sorry you're going through this. I hope you feel better soon.