The best advice I can give you is to find something interesting to do with your frustrated libidinic energy, rather than trying to get a girlfriend. Whether you're a nice guy or a jerk, women (and men) can smell desperation. It's a huge turn-off. Nobody worth dating wants to save you from your loneliness. Nobody is going to have sex with you just because "everyone deserves sex". Find a way to save yourself from your loneliness and you'll not only feel better about yourself and your situation, but also become more attractive to potential girlfriends.
If you must have it boiled down to a simple formula, there are few qualities you could develop that would be more attractive to women than a genuine disinterest that stems from being preoccupied with something more intriguing than getting a girlfriend. Rock climbing. Scuba diving. Playing an instrument. Writing a book. Meditation.
The worst case scenario is that learning to be happy and self-sufficient without a girlfriend doesn't attract a girlfriend, in which case, who cares?
Of course it goes without saying that you should take care of yourself and present yourself well. Look in the mirror. Could you do anything to make yourself more attractive? Dress a little better? Lose a few pounds, or put a few on? Get a haircut? Of course there's more to it than that, but being as physically attractive as you can will help get your foot in the door. Not many of us want to have sex with other people's potential inner beauty.