“Regret is a tough but fair teacher. To live without regret is to believe you have nothing to learn, no amends to make, and no opportunity to be braver with your life.”
If you have behaved badly, repent, make what amends you can and address yourself to the task of behaving better next time. On no account brood over your wrongdoing. Rolling in the muck is not the best way of getting clean.