In as much no one wants to fail, Failure can't be avoided if proper strategies are not used, BUT in a situation where you are faced with failure already what do you do ? to change things and revive positivity once again.
So many lack this skill in their lives, the act of still dwelling in self-pity after failing is not only mediocrity but wickedness because NO ONE ACTUALLY FAILS ALONE, every failure you have ever experienced has a way of springing up negativity and depression amongst the people around you, this alone is not healthy

So how do we walk out of failure

STEP 1: TAKE TIME TO ANALYSE THE REASON FOR THE FAILURE; 
Just as the Newtonian law of motion States; that for every action there's an opposite reaction, so take a breather and check out your actions or decisions that might have triggered the negative result, and when doing this, don't allow the feelings of the past influence your figuring out of the issue, and make sure you don't start pointing accusing fingers at anyone, just realize that the deed has been done, and try to tame corrections.

STEP 2: PICK UP THE PIECES AND MOVE AHEAD: 
as a matter of fact, there is no true and lasting success that has not passed true the face of failure, so pick up the remaining assets you can find within your reach and create a positive reinforcement for yourself, totally neglecting the pain of the past and the people you might have disappointed by simply proving to them that you can still do it again and this time better, I KNOW THIS COULD BE HARD but note that fear of them rejecting you will only withstand you from achieving your goal so face it with courage.

STEP 3; DEVELOP A STYLE OF EXCELLENCE: the truth still remains that you might have lost trust from people, but you can't obviously deal without them, so in other to win back their trust and your self-confidence, work towards impressing them with a touch of excellence in your next project. DO THIS CONSISTENTLY AND YOU SEE YOURSELF WALKING OUT ON THE FEAR AND EMBARRASSMENT OF FAILURE FOREVER.

Thanks for reading through Hope this was helpful, pls do drop a comment below!