Don't feel bad. Even if you're lonely, that doesn't mean you're alone. There are other people out there who feel the same way, and when you realize this, you're really not alone.
Then, you come together, and you don't feel lonely anymore.
The best kind of company is with those who have none.
But, even that can do you some good.
Don't focus on the pain of being alone; instead think about how other people are also alone, but that's what brings you close. You all share the search for company.