The following micro treatise on mistakes comes from a fantastic book on Eishin Ryu Swordsmanship, written by Masayuki Shimabukuro and Leonard J. Pellman, called Flashing Steel.
The message given can apply to life in so many ways.
In IaiJutsu, a confrontation ends in the blink of an eye and one of the combatants lies dead on the ground. The samurai could not afford to make a mistake. Mistakes, very simply, meant death.
On the other hand, the only way to learn an art as difficult and complex as IaiJutsu is to make mistakes. So in one respect, you must train with an intensity of kihaku as if there were no room for mistakes - as if they would be fatal - while in another respect, you must accept the fact that mistakes are a normal part of the learning process.
It is important, therefore, not to dwell on your mistakes, wether they are simply training errors in the dojo, or mistakes that have a serious impact in your life. If you allow errors in your past to have affect in your future attempts, at very least you will find yourself loosing confidence and going into a slump. At the worst, you can become so paralyzed by the fear of failure that you will no longer even try!
Furthermore, your mind will inevitably try to achieve whatever you visualize. So if you keep visualizing yourself making the same old mistake over and over, you are effectively training your subconscious to repeat it.
Instead, pay attention to your mistakes without dwelling on them. Try to determine what caused the error and how it can be corrected or avoided in the future, then visualize yourself acting correctly. In this way, rather than being a setback or hindrance, each mistake becomes an investment in your future success.
Remember, too, that it is far better to have tried and failed - and learned from the experience - than never to have tried, never to have learned, and never to have truly lived!