Discipline..self discipline is the major key to not repeating the same mistake over and over again.
Mistakes varies. there are some mistakes that can be avoided only if you can just be disciplined.
The first thing you need is to acknowledge the fact that it is actually wrong.
Secondly, set a self punishment for repeating the same mistake.
Most importantly, be self disciplined
We are all able to make the same mistakes over and over again, because, under pressure, we tend to retreat to emotional regulation habits that are formed in childhood. Habits rule under pressure and when the process of regulation of the prefrontal cortex (Adult brain) is burdened by physical or mental fatigue.
We see more and more evidence of Toddler's brain habits - impulsivity, poor judgment, self-obsession, and feeling unstable - because our lives have grown dramatically more complex than our brains evolved to handle, as neurologist Daniel Levitin describes in The Organized Mind. For all their benefits, technological advances also create excessive information and overstimulation, which causes more frequent retreat to the brain of a toddler. There we do not have foresight or the ability to think about the consequences of behavior.
Toddler's brain is dominated by feelings rather than fact analysis. If negative feelings, they look like alarms. Formed habits in the Toddler's brain are activated by feelings - especially negative feelings that seem like alarms - rather than analyzing the conditional context of past mistakes and their consequences. When we feel that way again, for whatever reason, past behavioral drives grow stronger, increasing the likelihood of repeating mistakes. We tend to eat the whole cake and then remember that we should have V-8 instead. We will launch anger (or press one) before we remember our resolution to take time when things get hot. We will sneer, criticize, and devalue others, instead of trying to improve and improve. The dominance of feelings (over judgment, analysis, foresight, anger management class