Just want to send @CobaltQueen a hug and say I hear you.
Also want to add that sometimes the lead up to loneliness like this can be extremely complicated. I'm a widow of 2.5 years and while I'm trying to make the most of my unwanted and unexpected "freedom and independence" (ha.ha.ha.) I have also been bewildered by the way our wide social circle has vanished like a puff of smoke.
I do have a handful of loyal friends who I see from time to time, but they have lives and families in a way I don't so I am alone and lonely most of the time. And I hide it as much as I can because I'm terrified of coming across as needy and a burden and frightening them away.
When I was trying to "put myself out there" nobody knew how to "deal with me" without my DP and I'd end up drunk and embarrassing. So I don't do that any more. My adult children have their boundaries and I respect them, restricting my contact to the odd "I'm fine - tell me all about you" calls. They don't call me.
I talk to my elderly Dad alot, as he's frail and unwell and has recently separated from my SM (it's complicated). He's lonely too but is hoping to reunite with SM although that's unlikely.
So I kind of have alot "going on" but I recognise the loneliness the OP speaks of. It's the lack of intimacy most of all I think. The easy connection that you can have with someone like a husband or close sibling or friend. Other associations are more formal if that makes any sense, and if you've been burned by people in the past, you do have barriers up because trust is hard.
People have suggested I'm still young enough at 55 to find love again and I don't know whether to laugh or cry. My late DP would be a hard act to follow. He was the love of my life and honestly I don't think I could face learning another human like that so yes, I'm my own worst enemy and prickly and defensive sometimes too.
Currently my future is looking like one long Swedish death clean because the ultimate sin would be leaving a mess (and believe me, there is a mess) for my children to deal with if anything happens to me.
And I do have a cat, so at least my vocal chords don't seize up as we have long meaningful conversations.
One of the hardest parts about being lonely and trying to do something about it is the feeling of being somehow marked, or different to "normal" people. And that's another odd thing, isn't it? All the lonely people (go on, sing it, I know you want to) skirting around each other, hiding their loneliness because the fear of yet another loss or rejection has become just too great to overcome. Because that's a part of it too.