Yeah, it hurts to hear it. The truth is, you'll get over it.
Realize that this person, no matter how much you like him or her, is not going to reciprocate. You can't make a person love you. And you can drive yourself crazy trying.
You deserve a partner who respects you and cares about you. You want to feel secure and valuable, right? Remember this.
At first, you'll experience denial. "It's not really over," you tell yourself. Now tell yourself that it's not your fault. You could have been this or that - but you weren't. Don't dwell on your imagined shortcomings.
Don't try to get him or her back by making drastic improvements. It won't work. It's too late for that. If you do anything, do it for yourself. Now is the time to be selfish.
Go to your friends or family - those who accept you and will understand your hurt.
Take up a hobby or sport. Get your mind off your breakup. Stay busy - this is key.
You will get depressed. It's normal. You will get angry; this is normal too.
Decide that you wanted it to be over. Convince yourself of this.
You might try finding someone else - and some people will suggest this - but it's not very healthy and won't really be fair to the new person. Give yourself time to pull yourself together.
Don't get obsessive. If you feel that you can't get over it by yourself, get professional help. You don't want to turn into a stalker.