Do not let failure discourage you.
The next time you fail, resist the temptation to let anger, frustration, discouragement or self-guilt make you give up. Give yourself time to process the negative emotions then make a list of the lessons you’ve learned from not reaching your desired outcome.
This will help you develop a positive mechanism for coping with failure. When you transform a failure into a list of lessons, you’ll empower yourself by thinking in terms of possible ideas for improvement instead of poisoning yourself with negativity. Once you do it next time you can easily transform failure into success.