once when my therapist asked me why i thought people didn't like me, i told her it was because i wasn't interesting. it was just what came out, so i made it more accurate by emphasizing that I thought I was interesting, but other people didn't know how interesting i was. she told me that the only way to show people you had something to offer is to put yourself out there. i'm still working on that myself, but i see where she comes from. i've learned that people are kinda like that old adage about spiders and stuff, "they're more afraid of you than you are of it". if you're in school, next time you get paired up for a group project or something ( and they can't escape uh i mean...) just start talking. about anything. some dude you saw at a bus stop with purple hair and a Snoopy tattoo on his forehead. your stupid math teacher that knows as much math as a 5th grader. or if you like their shirt or something, say so. people love compliments. keep it general if you don't like talking about personal things, but just talk.
but if you're at home in your bedroom or somewhere, and you feel that familiar emptiness somewhere around your sternum (maybe that's just me), think of something, anything that will make you feel even a little better. i know that's like asking a drug addict to "just stop doing drugs", but whether it's playing your favorite video game, reading a book, watching a movie, or even something like hitting your pillow against the wall or cutting up an old t-shirt, if it makes you feel just the tiniest bit better, it's somewhere to start.
I find things and outlets I enjoy. I roleplay. I boot up the xbox360 or a PC game. I go on Youtube marathons. I create and write my comic on deviantART. I model in Google Sketchup. And I know this isn't really healthy but eating your favorite food while watching a movie, no matter how fatty it is. It's a nice distraction to pig out once in a while.
I understand the feeling, asking why nobody gives you a chance at friendship. I'm in the same exact position and it eats away at you inside, making life painful. But even if you're not happy, you can still survive. Being lonely wont kill you and as long as you draw breath you have an opportunity to either find something that makes you happy, or let fate bring something, or someone to you. It's just a matter of how long the wait is.
definately agree with what Alice has said, The way i handle it personally though is attaching my goals to things not people. Like visiting somewhere i really want to go, doing something i really want to do - nothing beats achieving something by yourself knowing no one else is helped you do it, you realise what you can do and that you're a lot stronger human being than you think you are.
If no one wants to get to know you, get to know yourself better! I see my time alone as hanging out with an old friend that knows everything about me. Do something to explore your inner richness like learning meditation or lucid dreaming techniques :) chances are the deeper you go into self discovery the more you'll find out about what makes a you a likeable, relatable person