Maybe you didn't get the grade you wanted on a test. Maybe someone else got your dream internship. Maybe you were wait-listed at your top college choice.
We all deal with disappointment at one time or another. Of course I can cite famous examples of failure: Bill Gates dropped out of Harvard, Walt Disney was told he was not "creative enough" etc. etc., but I doubt these are examples you haven't heard a hundred times before. The truth is, everyone fails at one time or another, but it's how we handle our failures and how we learn from them that determines the future.
Of course you can feel bad about this for a while: take some time out of your day to watch your favorite movie or eat your favorite meal. At some point, though, you need to decide what you want to do with your failure. In my eyes, a failure is only truly a failure if you let it defeat you. As long as you take it in stride, a failure is only an opportunity to learn. So yes, mourn a little bit, but then ask yourself: how much time do I want to waste being sad? Do I want to ruin a whole day being sad? If the answer is yes, then take that time to be sad, but more often than not, it's not worth it, and you'll feel better once you move on.
By all means, take some time to be upset, but then use your failure to motivate you.
This can be an opportunity to explore new avenues and get new experiences. And even if you're really upset by something, then it lets you know that this is something that is truly important to you, and you shouldn't give up on it. Remember what J.K. Rowling (who has talked a lot about her failures before success in life) said: “Some failure in life is inevitable. It is impossible to live without failing at something, unless you live so cautiously that you might as well not have lived at all—in which case, you fail by default.”
Don't let your failures define you. Learn from them, use them to your advantage, and let them motivate you to be even better.