There's a lot of pain in self-loathing. I've wasted too many years of my life hating who I am. So have you. You are good enough the way that you are. I can tell from your posts here that you're intelligent and compassionate; those are the two biggest qualities I look for in friends.
I suggest that you get a pdoc and try to get your moods stabilized. I tend to hate myself the most when I have a moodstate that includes depression. The less depressed I am, the easier it is to accept myself.
Also, remember this: there is no hierarchy of human worth. No one person is more worthy than another because of intelligence, humor, looks, or anything. We are all EQUAL!
And lastly, for when you're feeling lonely (and you're not alone being lonely; you've got plenty of company, myself included): about what percentage of people that you meet like you? Let's say that it's 10%. 10% of 7 billion is 700 million. If only 10% of people like you, you still have 700 million potential friends! Even if only 1% of people like you, you have 70 million potential friends.
You're not alone.