I'm in the exact same position as you, except I have a few real friends. I have never kissed a girl, but I have a solution that works for me:
Free porn.
It really makes you feel better. What I would suggest you do is to stop caring about sex at this age, everyone eventually gets laid, and not necessarily by a hooker. Your life will kick ass once you get out of high school. If you are a loser now, you are not forever, regardless of what the school environment dictates to you. There are much finer things in life.
I do not think you are a loser, by the way.
Oh, and just so you know, I have never had sex, but I am really sure I would prefer masturbation. You get to pick and choose that way...I've talked to my friends who have had sex, and they all say it is highly overrated. It's not really that fun, it's not really that different, and it's not as wonderful as society says it is. Relax, life is not all about sex.
In short, have fun with your porn surfing days before you get married.
As to the friends part? All you have to do is use the internet. We at WTF.COM are always here for you. You could also try going to forums where people who have similar interests as you hang out. You can meet lots of people there. If you play online games, make a clan, that is a good way to meet people.
All of this will come with time. I am in your position and I use alternative methods to make friends.