Sometimes you win, sometimes you learn.
That's the title of a book by the great John C. Maxwell and truly, what better, more truthful book title could there be?
I believe winning is a basic human desire built into our grand design. I think the quest for winning is tied to the quest for survival. After all, if you're faster than the next guy you might take down that wooly mammoth or buffalo and your family would eat. Granted we may not be hunting wooly mammoths or buffalo these days, but deep down we all love to win.
Mathematically however, it's impossible to win at 100% of the things you attempt. So how do you deal with it when you don't win? When you lose? When you fail?
You have a lot of options. You could get annoyed, angry, frustrated, disappointed, or beat yourself up about the loss. You could vow to never fail at that thing again by not attempting again. You could let the loss and failure dissuade you from trying ANYTHING new or uncomfortable again.
Or after feeling the disappointment, anger or frustration, you could look at the outcome of a failed endeavor as simple data.
"I did X and the outcome was Y." Simple data.
The best thing about data is you can use it to your benefit to learn what doesn't work which creates an opportunity to change your strategy, tools, tactics or another variable and try another way.
When you realize life is a continuous experiment and losing or failing is just an outcome that provides valuable data leaving to new roads, it no longer feels bad to lose or fail. It's no longer "failing" it's LEARNING.
Sometimes you win, sometimes you learn, and since learning is always a win, you're always winning!