As far as managing it, I can't say much. I've found that reading blog posts and forums about loneliness tends to make things worse (not really a surprise there), and getting involved in a coding project makes things better (again not too surprising). I think it helps to have a small number of closer friends rather than a larger number of less close ones, because closer friendships can more easily survive lapses in communication. As for how to make close friendships, I'm quite bad at that. My only advice so far is: have conversations about difficult topics.
There are a few things that help me out in the lows:
- I have 2 close friends. To destroy these friendships, planet earth needs to be blown up. But I don't go out very often with them. To maintain this, we play almost daily for about an hour, dota2 or whatever else floats our boat. And then, I just log off skype. I'd play even if they weren't there. FOSS collaboration works just as well.
- Having a not too demanding girlfiend helps. Look for one so smart it cripples her.
There is a struggle -- not speaking for him but for myself -- between wanting companionship and wanting to be alone. I think my default state is, "I just want to be left alone", but every so once in a while all of the alone-ness (not loneliness per se, but all of the quiet and solitude and introspection and stillness that accompanies prolonged periods of being alone) kind of piles up and becomes too much to bear, and then I need to connect in some way with someone for a little while.
But, only a little while.
And, if I don't get to make that connection, then loneliness sets in: the feeling that I am no longer alone by choice, but rather that there is something wrong with me, something that is off-putting to other people. Then, I begin to feel unable to connect to others.
It is a damnable thing. I have tried all manner of approaches to "managing" it, to make it less pathological, but in the end I simply loathe the company of other people right up until I suddenly am desperate for it -- where it's too late and too difficult to get it because I don't maintain friendships and relationships the way that other people do.