Answer:
practise eqanimity. That is, accepting that life is unpredictable, and we don’t always got what we want – despite trying really, really hard.
Accepting that “we live life forwards but we make sense of it looking backwards.”
Accepting that good can come out of bad – if we approach it the right way.
Read this insightful article that explains how we grow from failure:
Whatever happened to “what might have been? Regrets, happiness and Maturity. King, LA and Hicks, JA, American Psychologist, October 2007, p 625