Whether you believe in God or don't, psychological studies show that believing God will forgive you for your mistakes will in turn help you move on from those mistakes and grow. I think that from a non religious perspective that it's important to forgive yourself for the things you've messed up in life. Dwelling on your mistakes does not help you grow, but analyzing how you can grow from them is very important. If you're interested in the purely non religious psychological studies of religions that have a "forgiving God" you can check it out at the article here https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4350493/
I've come to find that the energy I spend on "beating myself up" doesn't serve me. "Mistakes" are important, they're lessons. I practice accepting them, understanding that I'm doing the best I can, and upgrade my system -- Move Forward. I'm not suggesting that you brush off mistakes. No, rather, I'm suggesting you feel the pain, and learn from it.
I view regrets as a sign of growth, and you have to make the "mistakes" in order to grow. Life of gratitude.