Comment by aristofun
As long as you are obsessed with this - you'll perpetuate the problem. The more needy you are and craving for attention the more unattractive and uninteresting you look as a person.
The only solution for these types of problems (aside of usual phychotherapy/physiology that you need to rule out first with help of professionals!) - is to genuinely stop giving a single damn whether you're alone or not.
Right after that moment you will become much much more attractive as a person. And you will release a ton of energy to focus on things that are more important (like your life goals etc).
But you can't fool yourself and pretend that you don't care while still being worried about the outcomes inside. It's not "fake it till you make it" type of inner game.
That is a key to your problem (after you solved main mommy/daddy issues if any with a decent therapist).
No amount of shallow "be yourself, be interested in others" advice will help until you have a foundation to be congruent in these tactical actions. But if you have that foundation that type of advice is mostly redundant.
After reading your comment, I'm left wondering. What exactly is actionable in it? How exactly does it help a person in OPs position? Apart from the part deferring to a therapist, which is more or less common knowledge in this day and age, there's nothing there thats ... helpful. Actionable.