Can you think of any groups to join with people who share your own interests? If you like to write, a writer's group, read, a book club, run, a running club, ski, a skiing club, etc. The possibilities are endless... crafts, church, doggy play groups if you're into animals, etc. There's a site called meetup where you can meet local people who enjoy doing the same things as you. I don't know if you live in a city or a small town, of course it's easier in a city. Also a really good way to meet people is to volunteer. You can find areas to volunteer with online too... then you can meet people who believe in the same causes as you and like to help others.
I have this problem too because I'm shy and sometimes self-concious. Sometimes other people think I'm snobby or stand-offish. I am working on my people skills and I've learned you really have to get out there and
make friends, not let them make you. Also it sounds like you might be passive, like me... have you confronted your friends who ditched you and let them know how it made you feel? You have to be friends with yourself first.

I used to let friends walk all over me and then I was like, you know what, *I* have feelings and they can't just be trampled on like that. Maybe it was inadvertant or maybe there's a reason they could explain to you. Either way, you get to know more about yourself and your past friendships, and you can discern who is a good friend worth working on the relationship despite past problems or who needs to be chucked because they are too self-centered and don't care enough about your well-being.
I've realized that sometimes selfish people gravitate to me when they are needy, then forget about me when they're doing well. It's like I was an emotional sponge, soaking up other people's problems without dealing with my own or letting them know I wasn't a doormat to be stepped on. I had to weed out a few "moochers" and concentrate on people I thought were good and who really cared about me, even if they didn't "need" me as much as the ones who were always going through some dramatic episode and then deserting me when they found a guy to heap all their emotional issues on for awhile.
Just put some effort into:
1. Getting out there and meeting people
2. Finding a female or two you think would be good friend material
3. Working on developing that friendship
4. Seeing about talking to former friends who ditched you and determine why; let them know how that made you feel, even if it's hard; and
5. Be sure to keep in mind which friendships are balanced and healthy and which ones are needy, clingy, focused on the other person too much, neurotic, etc. Just like with relationships.
I can relate to you because this was an issue I had and I am working on bettering it. Now I have one really good friend and a couple pretty good friends. (That live where I currently do... I also have great friends I went to high school or college with that live thousands of miles away unfortunately.) I have cut some "moochers" out and I've realized it's better to have a few great friends you can rely on instead of a lot of iffy ones who you can't. Good luck.