I feel (from similar experiences) that it may be worth solving this in multiple directions.

Reading/Podcasts/Audiobooks (Audible or Libby)/new projects/long walks may help with loneliness. Later, maybe starting a private journal. Lots of suggestions already on that.

In the other direction (being social without guild/doubt about performative-self). You could try going outside of the box in general about that definition of "self". Not in a destructive way, but more in a "who I think I am got me here, try being somebody else and see if that feels better". The feel better (self monitoring) was key for me, as I could not figure out who I was, but I could try a thing and see if it felt right, wrong, or very wrong.

One of those healing discoveries was Improv (improvisational comedy). It feels scary from outside, but the courses (look for courses, not drop-ins) usually start very gentle. The thing that I discovered is that Improv explicitly allowed me to "not be myself" and to experiment with exploring and expressing things without costs associated with doing them for real with "true me". And you do get to meet people who are often quite interesting and accepting. I suspect that they start somewhat accepting and the "Yes and" practice of Improv deepens it.

Similarly, dance classes. The ones that force the rotations, have progressive courses and - in general - reduce your agency. I know, it is counter-intuitive. The point is that you just show up, and (learn to) dance. Not navigate the social rules of negotiating the individual dances. And if one style of dance does not give you the right feeling, try another one. Often, the popular dances (Salsa, Bachata, Reggaeton) are actually not the good community for this purpose as they double (and often are structured to enable) dating. But if you go to offbeat styles (West Coast Swing, Contra, Scottish Country Dancing, Lindy Swing, maybe Rockabilly, etc), they are mostly about community and acceptance.

Finally, I found Esther Perel's "Where do we begin" therapy podcasts very educational and transformational to think about the relationships and self. They are about other people's problems but you get to hear how Esther analyses them and it helps (helped me anyway) to start creating internal system of needs and priorities. This may help with "I know it is dumb thing and I do it anyway", because you keep hearing people explaining completely different failure scenarios and then Esther mapping them to more basic issues of having agency, being valued, etc. So, it helps to think about actual basic needs and then think about different ways those needs could be fulfilled and choosing ones least destructive. Or how to protect your core needs while exploring and expanding.

P.s. Good women/partners totally do exist. The hard part is that they need to be "good for you" and you "good for them". Until you know both what you are "running away from" and "running to", it is hard to evaluate whether there is a good match. Also, a lot of anecdata seems to suggest it takes 2 years in normal circumstances to walk that path from "getting away" to "knowing yourself".

P.p.s. Sorry, lots of quotes, not sure how to summarize it well. And I don't claim to have solve loneliness for myself, but it is nowhere as bad as it was. But if it resonates, feel free to ping.