I think the main question you're after has to do with loneliness.
There is nothing lonelier than being in the wrong relationship with the wrong person. It's much better to be alone than to be in the wrong company. Besides, should you live alone, that doesn't mean you live your life in a vacuum. You still have friends, they still come over for dinner, you can still go to concerts with them. If anything, you become more aware of how tied down your friends are to their kids, their dog, their spouse's schedule.
But true loneliness, no amount of friends can fix that. That's a between you and yourself thing. Other people may offer a pleasant distraction but, at the end of the day when everyone else has gone home, when your spouse has turned in and the kids have fallen asleep on the couch--you are still left with you. Who are you then? That's the person you should make peace with.
Go, find out who you are. Start a hobby. Join a group that meets once a month at the library. Keep a journal and record your likes and dislikes. Keeping a journal is a lot like storing things in a time capsule. You can read it five years from now and see if you still like/dislike those things. (It's kind of fun.) Continue your education. Volunteer. Make an elderly friend. Invest yourself in people who aren't able to give back to you--like crocheting a blanket to donate to your hospital for an expectant, low-income mother you will never meet.
Have you thought of sitting or visiting with cancer patients? I have found that those who want to live, whose time is being cut short in a most horrific way, sometimes have the clearest grasp on what the most important things in life are.
If you don't have people in your life who you care about but you want those people in your life, then consider going into a career as a nurse, or a social worker, or a teacher. You will find a world of people out there who could really use your help. A few of those whom you help may turn into true friends.
I live with friends and I deal with loneliness. Yet I'm surrounded by a very warm and welcoming family. Let me tell you, it's not on them that I deal with loneliness. No--the problem is with me and my perception. So I try to acknowledge that and be responsible for myself. For example, I've picked up a new hobby, I'm planning on continuing my education, and tomorrow I'm going to help an elderly friend with some housework. Now, I am not someone who looks forward to housework. But I know that after I go and do the work, and after I've visited a while, I'll feel better about myself as a human being because I chose to do the right thing. Besides, I really like my friend and do feel a bit honored that she'd reach out to me like this.
I think a near cousin of loneliness is selfishness. So if you're looking to cure loneliness, then you may want to ask yourself if you have any areas of selfishness that might need to be addressed. Selflessness--freely giving of yourself, your time, and abilities to another--is a profound healer of another related crime, which is the question of usefulness or purpose. This is going to sound crazy, but the more that I think about it as I'm writing this, the more it makes sense that the only way we can find ourselves is to empty ourselves, and we empty ourselves when we give of ourselves selflessly.
Hope this helps!