If you focus on the hurt, you will continue to suffer. If you focus on the lesson, you will continue to grow.
In our lives, we make mistakes many times. However the way we face mistakes and failures will bring very different effects.
If you think your failure is disappointing, you will make yourself negative. You feel depressed, not motivated to do it again.
Making mistakes is also the same. You think what you did is sinful, shameful. You will sink in suffering, despair. You can not realize there is always a chance for you to correct.
On the contrary, when you calmly look back on your failures and mistakes to find the cause and think of solutions. You see each failure as a lesson to lead to the success, every mistake is a lesson to fix yourself.
You will do better than the way you did. Eventually, you will achieve the results you desire.