Sometimes it's not good to succumb to the demands of society.
Having a social life is something that, in my opinion, I consider "overrated" because the truth is, it's not bad to be alone; sometimes it allows us more freedom to do what we want.
Of course, we all have different lifestyles, but what matters most here is to stop seeing things as something society demands.
Sometimes this can also be interpreted as envy.
And I don't want to sound rude, but envy poisons the soul.
I say this because what you're saying also happened to me.
I, too, was in a relationship, and just like you, I ruined it because of my depression and mental disorders.
I ruined it months before dropping out of college...
Every time I walk down the street or I'm on the bus, I envy seeing people who are happier than me, people who are laughing with their friends, or couples talking and kissing.
I understand when you say you want a happy relationship. It's a way to clear your mind from those who hurt you.
But in reality, it's not always good to depend on relationships that we don't know will be permanent. If one day those relationships end, you'll probably feel worse than you do now.
I don't have a magic solution, but something you can do is avoid situations that make you feel envious.
If you can't avoid them, try to distract your mind, focus on things that may be more relevant, like studying, work, something you enjoy doing, or seek a solution to distance yourself from those who harm you without considering CTB as the first solution.
For example, when I was 15, I stopped thinking about having a partner and focused on my studies. It was helpful because now my mind no longer attached importance to it.
The same goes for friendships.
I stopped thinking about having friends and being popular, and I focused on myself instead. In the end, I enjoyed being alone because I felt free.
This isn't something you can do overnight; it takes some concentration, but maybe it can help you in some way.
However, sometimes eliminating those desires by distracting your mind can harm your thoughts. I applied it to several things that stressed me out, and now I've become anhedonic...