As a person who makes many mistakes, I have become very effective at recovering. Here is my mental edge:
(1) Remember God has a plan for you that is bigger than this situation. (Minimize the situation by keeping perspective).
(2) Do not let one mistake or loss cause you to make others. This is not the time to sulk, or hang your head, or begin to rush. This is the time to focus. (Very important this one, as most people fail here)
(3)Stay in the present moment.
(4) Remember your focus is guided by the questions you ask yourself. So stop looking back.
(5) Refrain from "what if" and "why" questions.
(6) Ask yourself "how can I benefit from this situation" or better yet, "what can I do to make this situation work in my favor."
Again, this is what has worked for me. Do this and you can bounce back from all mistakes and even end up benefiting because you made them.