I don't know what to do about this friend I have. I think in my mind, they're a lot of the reason my ex was so abusive and why we broke up. But this friend has always been kind to me. And my ex made their choices to treat me poorly on their own. Even though they constantly compared me to this friend, belittling me for not being like them and only praising me when I was more and more like them, and this made me resent this friend more and more over time. But when I could spend time with them, especially without my ex, we grew really close and I had such a good time. They really have become one of my closest friends. But it hurts because when I talk to them about their life now I can only see how they're everything that I'm not. Rather than enjoy my friendship with this person, I hate everything about them. I hate it when they talk to me about things we have in common. I hate it when they do things that are cool, I hate when I see pictures of them where they look good or when they tell me about a cool thing they did recently even if it's something I would otherwise like. I hate them because I failed to be enough like them that my ex could love me. They were the standard I could never live up to. But they're a good person whose friendship I want to reciprocate. And I don't want to hate them just because my ex made me so insecure over them. I don't know how to make it stop. I tried distancing myself for a while, it didn't help. We can have good talks and I can fake being okay with talking to them when my feelings are overwhelming, but half the time I cringe in anger at everything they say or do and I don't even know why. How do I just see them as a friend and enjoy our friendship when I feel this way?

Tl;Dr: how do I stop hating a very good friend my ex constantly made me feel inferior to?