Maybe you just got rejected by your dream school. The job interview inexplicably didn't pan out. The audition committee told you that you just aren't the right fit. Whatever form it takes, rejection stings.
Unfortunately, it's also a part of any career. I've been turned away from opportunities I thought I was perfect for, and so has everyone else I know. But if you really want to end up somewhere, you'll find a way. I was rejected from Boston University during my undergraduate audition process, and instead of letting that deter me from musical study, I went to an equally great school in another area. This school gave me the preparation I needed to get into a wonderful graduate program in Boston, so I ended up here even though it took a few extra years. It's easy to see those events unfolding in hindsight, but at the time, I had no idea how everything would turn out.
Rejections weed out the insincere. The people who hold long careers in a certain field have to be not only good at what they do, but also tenacious enough to keep trying to move forward when they meet resistance. Being amazing at what you do only helps if you keep on doing it.
So what are you supposed to do when the thing you wanted so badly doesn't work out? Use it as a cheat sheet for the next thing that comes along. You're allowed to be disappointed for a little while, but then you have to step back and examine what happened. What do you wish you had done differently? Perhaps a follow-up phone call about that job interview you were so excited about would have helped you snag the position. Maybe choosing your audition repertoire sooner would have made that orchestra job yours. Now you know for next time.
Ultimately, all you can do is make the next smart decision that comes your way.