Codependency on ex boyfriend

Hi everyone, 26F here. Sorry for the long post. Four years ago, I started dating a guy from my master’s class. Initially, I had feelings for a friend of his, but that didn’t work out. This other guy was already my friend—he was sweet, considerate, and helped me a lot. Over time, I developed feelings for him, and we started dating.

The problem was, I later realized I didn’t truly love him. I grew up in a toxic household, and my siblings weren’t there for me, and I’ve been alone for most of my adult life. I realized I was more dependent on this guy than in love with him. I broke up with him about 2 months later, but I felt like I couldn’t handle life alone. I also don’t have friends—I’ve always been a loner.

Over the years, things between us have gotten worse. We never officially got back together, but he made sure I didn’t get close to any other man. He also forced me to block and send nasty messages to any man I ever spoke to online. He claims he doesn’t have feelings for me anymore and that we’re just friends, yet he gets incredibly jealous if I so much as look at another guy. He abuses me and calls me names for "being desperate for men's attention"

Recently, I developed a small crush on someone at work, and my ex made me block him everywhere. I’ve tried cutting ties with my ex multiple times, but he knows where I live, so he just shows up and picks fights (I live alone). My loneliness and lack of family support have made me completely dependent on him, and I don’t know how to break free. I feel like I’ll never be able to love someone else because he refuses to leave me alone.

I’m generally a strong person, and I’d rather be alone than have friends I don’t truly connect with. However, whenever life throws even the smallest inconvenience my way, I feel the need to seek guidance and support. That’s when I end up going back to him for help. He does go out of his way to help me, but it always comes with the cost of him trying to control my life.

I don’t know what to do anymore. Any advice?