To overcome sorrow about past mistakes ...
Look at the bright side, and look forward to the future.
It's quite possible that the lesson has found you a better version of yourself.
Learn the lesson, pay your dues.
- At best, you now understand the problem down to its roots. It can't trouble you any more!!
- As the next best, you can turn the problem into an opportunity.
- At the very least, you've learned to avoid similar things in future.
Without these mistakes, you get the worst outcome: Like those who don't know History, you will repeat them indefinitely.