Take a step back from what you see now and think about how things came to be. For example, let's look at Apple Inc. They are the most valued company in the world as of January 2014. However, they didn't become successful overnight. It took Steve Job over 10 years of various failures till he got a gate of opportunity to make Apple this company that makes premium products. In that 10 years Apple was also bankrupt and didn't have the funding to continue until Microsoft, their competitor, came along and invested $150 million in the 1990s. You can read about it on Wired.
Now take a reality check of your life. Think about what you failed in and what you learned from it. Failure helps us learn better and faster. When we study something for a test, we ignore what we understand but we are more focused on things that we don't understand. Let's say you just took a test, and you were expecting a 100%, but instead you got a 90%. Because you missed that 10% you want to know why you missed those questions and you will study those questions. I can guarantee you that you will remember those 10% that you got wrong and you will not miss those questions again if they came up on a cumulative exams.
When we fail, we get the opportunity of learning and not making the same mistakes again. We gain the the confidence and the assurance of what is right from wrong from each failure. You chances of success grows as you fail more and more. Let's look at it from a lovers point of view. A guy who has a bad time with relationships will eventually learn from each failed relationship. Each time a relationship doesn't work out he will gain experience of how to make the next relationship better.
Failure Early in Life is Better
It's better to make mistakes and fail while you are young than when you are older. When we are older we have more responsibilities and our mistakes have greater consequences. However, when we are young, we have the luxury of making mistakes and getting away with it because we don't have that same higher status as we do when we are older. Example, when girls are younger they like the "bad boy" type of guys because those guys have that alpha-male image. But with time, as girls get older, girls learn that these "bad boys" are trouble and have no future they avoid them.
In conclusion, don't be down if you failed at something. Opportunities come and go, so learn from your past and make the next opportunity a success story.