Events occur that bring us down. That's natural and happens regularly to every person. The key is to recognize that these mistakes, errors, and troubling events are evidence that we're incomplete, but not failures. We are all works in progress, evolving individuals in a sea of expected and unexpected events. We do our best to see these life events as part of the landscape that we're traversing--the downs that take a little more perseverance, reflection, positive self talk, and cheerleading to move ourselves and others ahead.
The focus is to see these events for what they are--troubling yes, but opportunities for growth too. See the promise in the problem, urge yourself forward, and focus on what you can do in these times. That will give you the energy you need to move forward. Onward.