Mistakes linger cruelly in your mind. Something dumb you did in fifth grade can still make you cringe two decades later. And big errors — ones that affect your friends and loved ones — those can depress your entire mood for years at a time.

Regret can be painful. Whether you’re regretting a long-lost relationship, hating yourself for hurt you caused your friend, or simply focused on a poorly thought-out comment, the notion that you should have been better may preoccupy your mind.

But you don’t have to live like this. Learning to live with regret is possible. You can even learn to overcomeregret. Here’s how.

Ways to Deal with Regret

1. Apologize

If you can’t get an agonizing memory out of your head, sometimes this simple solution suffices: an apology. It’s never too late to apologize for a poorly worded statement or a misdeed that left your friends upset. Saying those dreaded words — I’m sorry — can be incredibly cathartic.

But sometimes apologizing isn’t the solution. Are you beating yourself up for something small and irrelevant? Was anyone else actually hurt by your actions? Or are you just apologizing in hope your affected friend will assuage your guilt? An apology might not help.

In those circumstances, the person from whom you should seek forgiveness is yourself.

2. Forgive yourself

Do it. Forgive yourself. How you want to do this depends greatly on your personality. Perhaps a quick moment of self-assurance will help wipe away the pain. Or maybe this process takes more time. Don’t feel strange apologizing to yourself — you may even want to write out your wrongs with pen and paper.

Accepting your flaws can be a lifelong process, but you can start with forgiving your mistakes. You’re not a bad person because you screwed up. You may need to try harder (or differently) next time.

3. Challenge your negative self-talk

“I’m the worst,” you might find yourself thinking. “I can’t believe I would be so stupid.”

Stop. Okay, fine: Stopping isn’t so easy. The thoughts just come, no matter what you do! But in order to overcome your feelings of regret, you have to start challenging every negative thought that bubbles in your brain.

Meditation can help tremendously. Spending time alone with your thoughts will help you identify those intrusive thoughts — and learn to ignore them. Soon, you’ll be able to identify and challenge negative self-talk. Instead of “I’m the worst,” think: “I made a poor decision. But I know that now, and I’m working on improving myself!”

4. Stop judging yourself

Once you’re regularly challenging intrusive thoughts, you can focus on loving yourself again. Judging yourself isn’t productive — all it serves is keeping yourself continually down in the dumps.

To get over regret, you’ve got to stop being mean to yourself.

One of the key ways to stop self-judgment is curiosity. Instead of hating yourself for your past mistakes, be curious about why you made them. Were you upset with someone? Jealous? Acting impulsively? Answering those questions will help soften your view of yourself.

5. ..But make sure you’ve learned from your mistakes

Sometimes, the things we regret were genuinely terrible mistakes. Maybe, just for example, you forgot to tell your friend you can’t make it to Ski Trip 2018 in Breckinridge and, as a result, he booked a too-big house — and lost a lot of money. Maybe you backed into your grandmother’s car. Maybe made a comment about someone’s appearance that they can’t do anything about. Maybe you let “The One” get away.

No one should live with regret. But it is important to honestly assess why you’re regretful. If you were absent-minded, make a point of practicing mindfulness. If you were thoughtless, work on keeping your friends in your thoughts. And if you focused too much on someone’s negatives, consider looking at the bright side — so next time, you won’t let an amazing partner go.

Once you’ve identified areas for self-improvement, it’s time to let the regret go.

Think about what you’re doing right

Your life isn’t defined by your past actions. Moving forward, focus on the good things you’re doing now. Did you recommend a friend for a job? Walk your grandma’s dog? That’s great!

Focusing on the ways you’re succeeding floods your brain with good thoughts, which helps stifle the negative self-hate cycle. Spend a few moments each day thinking about everything that went right. What are you grateful for? What went right? In what ways did you succeed — or help your friends succeeded? Switching your focus will soon improve your overall outlook.

Don’t let regret cloud your mind. Mindfulness can help you overcome its dreary pull. And if you’re still struggling with what you “should” have done, reach out to a licensed therapist.

Originally published on Talkspace.

What to Do if You ‘Lose It’ at Work

6 Self-Care Secrets to Reduce Stress

4 Ways to Ditch the Comparison Game on Social

Follow us here and subscribe here for all the latest news on how you can keep Thriving.

Stay up to date or catch-up on all our podcasts with Arianna Huffington here.