What we can do is: recognize the mistake, what lead us to the mistake, how we can prevent doing it again, and how we can learn and grow from the mistake. You can't move forward if you continue to hold yourself back. We have to understand that the Lord has never left our side and all we have to do is turn to Him for help, love, security, understanding, forgiveness, support, and etc.
"I look up to the mountains---does my help come from there?
My help comes from the Lord who made heaven and earth!
He will not let you stumble;
the one who watches over you will not slumber.
Indeed, he who watches over Israel never slumbers or sleeps.
The Lord himself watches over you!
The Lord stands besides you as your protective shade.
The sun will not harm you by day, nor the moon at the night.
The Lord keeps you from all harm and watches over your life.
The Lord keeps watch over you as you come and go,
both now and forever." -Psalm 121
Trust in the Lord to get you through those tough times in life. Allow the Lord to take complete control and you follow his lead. Accept the changes that the Lord wants to make within you and please work towards them.
So as humans, we will make mistakes but you have to stop beating yourself to the ground to stand up!