Most of us have experiences or events from our past that we regret. Maybe it’s something we wish we had said or done that still haunts us. A behavior that still makes us cringe years later. A path or an action we didn’t take. And we wonder to this day what our life would be like if we had acted differently.

Amy Summerville, Ph.D, senior research scientist at Kairos Research, defines regret as “feeling bad because [we think that] things could have been better if we had done something differently in the past.” Before joining Kairos, Summerville ran The Regret Lab at Miami University in Ohio for more than 10 years. She and her team of researchers studied when and why people think about regret and the impact those thoughts have on behavior and emotions.

Apparently, regrets start early in life. According to Summerville, research suggests that by around age seven we develop an ability for what’s called counterfactual thinking—constructing how our world might be different under some other set of circumstances. What would life be like today if we’d made different choices in the past?

Summerville also examined the impact of different types of regrets. For example, regrets about actions, such as saying something unkind, typically don’t stick with us for very long. “You’ll smack yourself upside the head, like, ‘Why did I say that?!’” Summerville says. But it won’t linger. “Researchers call it hot regret, and it burns brightly at first, but cools quickly.”

In contrast, regretting something that we didn’t do—not taking a job transfer to an exciting city, not trying harder to make a relationship work, not taking better care of ourselves—tends to be remembered for a longer time. People most regret perceived “missed opportunities” that they can’t go back and redo. “They look back on their lives and wish they’d been braver or taken more chances,” Summerville says.

But instead of feeling remiss about regrets, Summerville believes we can use them to our advantage. To start, we need to stop focusing solely on our actions and consider the bigger picture. “We exaggerate how much control we have or how much opportunity we actually had to make things different,” Summerville says. “There were a lot of other people in your life, lots of other pieces that could have played out differently than just your own actions. Sometimes we take on more responsibility than we should, imagining that we could have done more to make things happen differently.”

Then think about your regrets and look for patterns. For example, are most of them about missed opportunities because you tend to be cautious? “Maybe that’s telling you something about the person you want to be,” Somerville says. “That’s one way regret can help nudge us forward toward a fuller life.”

Which is why Summerville believes that regret is a hopeful emotion. If framed differently, regrets can help us learn from our mistakes and figure out what we can do better or differently in the future. Here’s how to get started.

Try not to ruminate.

Summerville has found that a big part of why we struggle with regret has to do with rumination, where we repeatedly replay past events over and over in our minds without getting anything new out of them. “That’s unproductive,” she says. People who ruminate tend to experience the most negative outcomes and are more likely to have clinical depression or anxiety.

On the other hand, people who say they have no regrets probably mean they don’t dwell on them, Summerville says. They feel regret, they learn a lesson, and then they move on. “That, I think, is great, healthy, and totally reasonable,” she says.

A mindfulness practice can help you learn to live in the moment. If you’re new to the practice, consider starting simply, such as taking a break to listen for sounds, or try going for a short mindful walk.

Share regrets with others.

Giving a voice to our regrets can help us understand and learn from them. Converting our stomach-churning feelings into words makes them more concrete, which in turn helps us analyze and learn from them.

Studies show that sharing negative emotions such as regret with a trusted partner or friend can be healing by reducing stress. If you’re unsure about sharing, studies also show that writing about your concerns can provide the same benefits.

Choose compassion.

Making mistakes is part of life, and some regret is inevitable. “It’s implausible” to feel like you’ve never made a mistake, Summerville says. Rather than beating yourself up, think about what you’ve learned and how you can do better next time.

Studies have shown that those who address regret with self-compassion were more likely to change their behavior moving forward. In part, that’s because self-compassion appears to orient people to embrace their regret, which steers them toward improvement. To reframe negative thoughts, think about what you would say to a friend. How would you help comfort them or encourage their growth? You deserve the same caring encouragement.