A mentor of mine recently passed away, and I was heartbroken—so I tried my best to avoid thinking about it. I didn’t even mention it to my family because I didn’t want those sad feelings to resurface.

In other words, I took the very enlightened approach of pretend it didn’t happen—one that’s about as effective as other common responses such as get angry, push people away, blame yourself, or wallow in the pain.

Even for the relatively self-aware and emotionally adept, struggles can take us by surprise. But learning healthy ways to move through adversity—a collection of skills that researchers call resilience—can help us cope better and recover more quickly, or at least start heading in that direction.

The Greater Good Science Center has collected many resilience practices on our website Greater Good in Action, alongside other research-based exercises for fostering kindness, connection, and happiness. Here are 12 of those resilience practices (squeezed into five categories), which can help you confront emotional pain more skillfully.

1. Change the narrative

When something bad happens, we often relive the event over and over in our heads, rehashing the pain. This process is called rumination; it’s like a cognitive spinning of the wheels, and it doesn’t move us forward toward healing and growth.

The practice of Expressive Writing can move us forward by helping us gain new insights on the challenges in our lives. It involves free writing continuously for 20 minutes about an issue, exploring your deepest thoughts and feelings around it. The goal is to get something down on paper, not to create a memoir-like masterpiece.

When something bad happens, we often relive the event over and over in our heads, rehashing the pain. This process is called rumination; it’s like a cognitive spinning of the wheels, and it doesn’t move us forward toward healing and growth.

A 1988 study found that participants who did Expressive Writing for four days were healthier six weeks later and happier up to three months later, when compared to people who wrote about superficial topics. In writing, the researchers suggest, we’re forced to confront ideas one by one and give them structure, which may lead to new perspectives. We’re actually crafting our own life narrative and gaining a sense of control.

Once we’ve explored the dark side of an experience, we might choose to contemplate some of its upsides. Finding Silver Linings invites you to call to mind an upsetting experience and try to list three positive things about it. For example, you might reflect on how fighting with a friend brought some important issues out into the open, and allowed you to learn something about their point of view.

In a 2014 study, doing this practice daily for three weeks helped participants become more engaged with life afterward, and it decreased their pessimistic beliefs over time. This wasn’t true for a group whose members just wrote about their daily activities. It was particularly beneficial for staunch pessimists, who also became less depressed. But the effects wore off after two months, suggesting that looking on the bright side is something we have to practice regularly.

2. Face your fears

The practices above are helpful for past struggles, ones that we’ve gained enough distance from to be able to get some perspective. But what about knee-shaking fears that we’re experiencing in the here and now?

The Overcoming a Fear practice is designed to help with everyday fears that get in the way of life, such as the fear of public speaking, heights, or flying. We can’t talk ourselves out of such fears; instead, we have to tackle the emotions directly.

The first step is to slowly, and repeatedly, expose yourself to the thing that scares you—in small doses. For example, people with a fear of public speaking might try talking more in meetings, then perhaps giving a toast at a small wedding. Over time, you can incrementally increase the challenge until you’re ready to nail that big speech or TV interview.

In a 2010 study, researchers modeled this process in the lab. They gave participants a little electrical shock every time they saw a blue square, which soon became as scary as a tarantula to an arachnophobe. But then, they showed the blue square to participants without shocking them. Over time, the participants’ Pavlovian fear (measured by the sweat on their skin) gradually evaporated.

In effect, this kind of “exposure therapy” helps us change the associations we have with a particular stimulus. If we’ve flown 100 times and the plane has never crashed, for example, our brain (and body) start to learn that it’s safe. Though the fear may never be fully extinguished, we’ll likely have greater courage to confront it.

3. Practice self-compassion

I’ve never been a good flyer myself, and it was comforting when an acquaintance shared an article he wrote about having the same problem (and his favorite tips). Fears and adversity can make us feel alone; we wonder why we’re the only ones feeling this way, and what exactly is wrong with us. In these situations, learning to practice self-compassion—and recognizing that everyone suffers—can be a much gentler and more effective road to healing.

Self-compassion involves offering compassion to ourselves: confronting our own suffering with an attitude of warmth and kindness, without judgment. In one study, participants in an eight-week Mindful Self-Compassion program reported more mindfulness and life satisfaction, with lower depression, anxiety, and stress afterward compared to people who didn’t participate—and the benefits lasted up to a year.

One practice, the Self-Compassion Break, is something you can do any time you start to feel overwhelmed by pain or stress. It has three steps, which correspond to the three aspects of self-compassion:

Be mindful: Without judgment or analysis, notice what you’re feeling. Say, “This is a moment of suffering” or “This hurts” or “This is stress.”

Without judgment or analysis, notice what you’re feeling. Say, “This is a moment of suffering” or “This hurts” or “This is stress.” Remember that you’re not alone: Everyone experiences these deep and painful human emotions, although the causes might be different. Say to yourself, “Suffering is a part of life” or “We all feel this way” or “We all struggle in our lives.”

Everyone experiences these deep and painful human emotions, although the causes might be different. Say to yourself, “Suffering is a part of life” or “We all feel this way” or “We all struggle in our lives.” Be kind to yourself: Put your hands on your heart and say something like “May I give myself compassion” or “May I accept myself as I am” or “May I be patient.”

If being kind to yourself is a challenge, an exercise called How Would You Treat a Friend? could help. Here, you compare how you respond to your own struggles—and the tone you use—with how you respond to a friend’s. Often, this comparison unearths some surprising differences and valuable reflections: Why am I so harsh on myself, and what would happen if I weren’t?

Once we start to develop a kinder attitude toward ourselves, we can crystallize that gentle voice in a Self-Compassionate Letter. This practice asks you to spend 15 minutes writing words of understanding, acceptance, and compassion toward yourself about a specific struggle that you feel ashamed of—say, being shy or not spending enough time with your kids. In the letter, you might remind yourself that everyone struggles, and that you aren’t solely responsible for this shortcoming; if possible, you could also consider constructive ways to improve in the future.

4. Meditate

As mindfulness gurus like to remind us, our most painful thoughts are usually about the past or the future: We regret and ruminate on things that went wrong, or we get anxious about things that will. When we pause and bring our attention to the present, we often find that things are…okay.

Practicing mindfulness brings us more and more into the present, and it offers techniques for dealing with negative emotions when they arise. That way, instead of getting carried away into fear, anger, or despair, we can work through them more deliberately.

One of the most commonly studied mindfulness programs is the eight-week-long Mindfulness-Based Stress Reduction (MBSR), which teaches participants to cope with challenges using a variety of meditation practices (including the ones detailed below). Various studies have found that MBSR has wide-ranging health and psychological benefits for people in general, as well as those struggling with mental illness or chronic disease.

One meditation that might be particularly effective at calming our negative thoughts is the Body Scan. Here, you focus on each body part in turn—head to toe—and can choose to let go of any areas of tension you discover. Strong feelings tend to manifest physically, as tight chests or knotted stomachs, and relaxing the body is one way to begin dislodging them.

In one study, researchers found that time spent practicing the Body Scan was linked to greater well-being and less reactivity to stress. Being more aware of our bodies—and the emotions they are feeling—might also help us make healthier choices, trusting our gut when something feels wrong or avoiding commitments that will lead to exhaustion.

When stress creeps in, good habits often creep out—and one of those is healthy eating. When we’re emotional, many of us reach for the sweets; when we’re short on time, fast food seems like the only option. So in addition to helping us cultivate mindfulness, the Raisin Meditation could help change our relationship to food.

This exercise invites you to eat a raisin mindfully—but wait, not so fast. First, examine its wrinkles and color; see how it feels between your fingers, and then take a sniff. Slowly place it on your tongue, and roll it around in your mouth before chewing one bite at a time. Notice the urge to swallow, and whether you can sense it moving down your throat into your stomach. Not only will you have practiced mindfulness, but you may never look at food the same way again.

One final meditation that we can sprinkle throughout our day—or practice on its own—is Mindful Breathing. It involves bringing attention to the physical sensations of the breath: the air moving through the nostrils, the expansion of the chest, the rise and fall of the stomach. If the mind wanders away, you bring attention back. This can be done during a full 15-minute meditation, or during a moment of stress with just a few breaths.

In one study, participants who did a Mindful Breathing exercise before looking at disturbing images—like spiders or car crashes—experienced less negative emotion than people who hadn’t done the exercise. Negative thoughts can pull us along into their frantic stream, but the breath is an anchor we can hold onto at any time.

5. Cultivate Forgiveness

If holding a grudge is holding you back, research suggests that cultivating forgiveness could be beneficial to your mental and physical health. If you feel ready to begin, it can be a powerful practice.

Both Nine Steps to Forgiveness and Eight Essentials When Forgiving offer a list of guidelines to follow. In both cases, you begin by clearly acknowledging what happened, including how it feels and how it’s affecting your life right now. Then, you make a commitment to forgive, which means letting go of resentment and ill will for your own sake; forgiveness doesn’t mean letting the offender off the hook or even reconciling with them. Ultimately, you can try to find a positive opportunity for growth in the experience: Perhaps it alerted you to something you need, which you may have to look for elsewhere, or perhaps you can now understand other people’s suffering better.

If you’re having trouble forgiving, Letting Go of Anger through Compassion is a five-minute forgiveness exercise that could help you get unstuck. Here, you spend a few minutes generating feelings of compassion toward your offender; she, too, is a human being who makes mistakes; he, too, has room for growth and healing. Be mindfully aware of your thoughts and feelings during this process, and notice any areas of resistance.

Not convinced this is the best approach? Researchers tested it against the common alternatives—either ruminating on negative feelings or repressing them—and found that cultivating compassion led participants to report more empathy, positive emotions, and feelings of control. That’s an outcome that victims of wrongdoing deserve, no matter how we feel about the offenders.

Stress and struggles come in many forms in life: adversity and trauma, fear and shame, betrayals of trust. The 12 practices above can help you cope with difficulties when they arise, but also prepare you for challenges in the future. With enough practice, you’ll have a toolbox of techniques that come naturally—a rainy-day fund for the mind, that will help keep you afloat when times get tough. Just knowing that you’ve built up your skills of resilience can be a great comfort, and even a happiness booster.

This article originally appeared on Greater Good, the online magazine of UC Berkeley’s Greater Good Science Center, one of Mindful’s partners. View the original article.