If you want to detach from a toxic relationship you have to see it for what it was and not what you wanted it to be. The good times were the lie, the bad times were the truth. It is not that you weren't good enough, there was no amount of good enough that could have fixed that relationship. Any feelings of love connected to that relationship were not love, they were toxic addiction. Love doesn't feel like you want to sing one minute and die the next. Love feels consistent, safe and secure.
Let it go. It was never good, he was never good. You did you best and you can hold your head up high.