If loneliness is a problem you're facing at this point in life, let's take a look at some antonyms of the word. The opposite of "loneliness" would be described as companionship, friendship, togetherness. Correct me if I'm wrong, but it looks like part of your problem could be a lack of companionship!
Last summer I suffered through loneliness as Tim traveled the East Coast with GloryBound, the men's quartet from Heartland. I had known Tim for years, and I hadn't gone more than three days without seeing him at church. My buddy got taken away from me for three months! I went through major withdraws! Talk about loneliness!
A simple way to counteract this empty feeling is to pour your life into someone else. While having a girlfriend to ramble with wasn't the same as having Tim around, it did help me tremendously. I could talk to her about anything, I could cry with her, and I could take her out on "dates" while Tim was busy! What a blessing it is to have a genuine friend.
The key to friendship is that it is selfless. Target someone you think could use a friend, and buy her ice cream, play a game together, or have her sleep over. Invest yourself in her, not to get something out of her, but to add something to her life. Text her every now and then, email each other funny jokes that have already been forwarded thirty two times, and go shopping together.
You'll find that making yourself busy with the well-fare of someone else will take your mind off how miserable you thought you were. Loneliness might still rear its ugly head every so often, but it won't be nearly as bad as if you didn't have a friend to counteract it.
A man that hath friends must shew himself friendly: and there is a friend that sticketh closer than a brother.