When I get lonely, all I need to think about is some of the more annoying folks I've had to work with over the years. God bless em. A few minutes remembering their antics, and I appreciate my solitude anew.
I tend to think of the people who were made uncomfortable by my antics instead, but I feel a similar sense of relief to be free of them. I've often found comfort in the H.G.Wells short story "The Country of the Blind".