One of the bigger mental mistakes athletes across all sports make is to hang onto their mistakes during competitions. The time to work on your mistakes is ALWAYS in practice and NEVER while you're performing. Your job when you screw up is to immediately leave the mistake behind you, in the past and refocus on what you're doing RIGHT NOW!

How do you consistently do this? First, you have to understand that it is a huge mental mistake to carry your mistakes around with you while you're still competing. Second, you need to learn and master a mistake ritual.

What's a mistake ritual? It's a little routine that you can quickly go through right after a mistake (when there's time) to help you mentally let go of your mistake. Mistake rituals are really helpful for sports where there are a lot of natural breaks in the action like tennis, golf, baseball, softball, football, etc. They are also useful in a continuous action sport like soccer for example, if your position allows you time in between play, i.e. the goalie position.

Mistake rituals should be simple, concise and involve several component parts that when sufficiently practiced in practice, can be done without thinking. How many parts is completely dependent upon you, your sport and the position that you play. If you're a field player in soccer for example, your mistake ritual might simply consist on one word, "cancel" or "erase" that you quickly flash through your mind the instant that you make a mistake to remind you to immediately refocus on the play at hand.  

When you have more time like in baseball, tennis, golf,  etc., your mistake ritual should help you do three things: First, switch your focus of concentration away from the mistake; Second, physically and mentally calm you down; Third, neutralize any negative self-talk.  

Here's an example of a mistake ritual from golf. After hitting a bad shot, the player picks up a few blades of grass and begins to walk to his next shot. While he does this he deliberately focuses his concentration on the grass in his hand. While he does this, he also begins to slow and deepen his breathing to calm himself down. The purpose of the grass is to help the athlete switch his focus away from the mistake. The purpose of slowing and deepening his breathing is two fold. Like concentrating on the grass, focusing on your breathing will distract you from the mistake and also calm you down. Finally, after taking a few slow deep breaths, when he begins to feel calmer and back in control, the player then takes the grass and throws it away and leaves it behind him, (which is exactly what you want to do with your mistakes, throw them away and leave them behind you!)  

Mistake rituals work best when you can do something physical (throw the grass away) that represents what you're trying to do mentally, let go of the mistake. For example, a batter in baseball steps into the batter's box for his second at-bat. He struck out in his first at-bat and part of him keeps remembering this. The hitter, steps into the box, looks down, makes a mark with his foot (the mark represents his last at-bat) and then rubs the mark out (consciously thinking, "That's in the past, it's gone, I'm erasing it and this is a brand new at-bat, focus on just this pitch, one pitch at a time."  

Mistake rituals take much more time to explain than to actually do. Take some time to come up with a little routine that you can always use whenever you mess up to help you get your head back in the game.