Although we dream of living without them, regrets are unavoidable. Regret can be a terrible feeling, but it also helps us improve by reminding us of what we did badly, and what we need to do better.
Author Kathryn Schulz says in a TED Talk:
If we have goals and dreams and we want to do our best, and if we love people and we don't want to hurt them or lose them, we should feel pain when things go wrong. The point isn't to live without any regrets, the point is to not hate ourselves for having them… We need to learn to love the flawed, imperfect things that we create, and to forgive ourselves for creating them. Regret doesn't remind us that we did badly -- it reminds us that we know we can do better.
Learn from what happened. Regret can serve less as a mark of failure and more as a reminder. If you made a mistake, it's OK to feel guilty, but you should get over feeling shameful. If you ever think it's too late to change, remember it doesn't help to waste time regretting wasting time.
Kathryn Schulz on the Psychology of Regret and How to Live with It [Brain Pickings]