Neuro-linguistic programming (NLP) recognises that people use unconscious patterns of behaviour as strategies to get through life. Becoming aware of these patterns is very useful so that you can do more of what works for you and change those that get in the way of your success.
If your strategy for dealing with mistakes is to dwell on their negative consequences, you can change this pattern of behaviour by viewing them as feedback rather than failure. Ask yourself what you learned from each experience and what you'd do differently in future.