Learning from Mistakes
When we do something bad, in the sense that we cause suffering to ourselves or others, we feel guilt.
We want to stop these bad actions, so the first thing we think of is the brute force approach. This entails saying to yourself that you'll never do that thing again. This approach may work temporarily, but it also may not work at all. Even if it works perfectly, the brute force approach does not change your fundamental understanding of the situation.
From a Buddhist point of view, learning from mistakes does not involve beating yourself up over failure. It means seeing that your actions cause suffering. If we see this, we won't perform those actions anymore. We won't make those mistakes anymore.