Odds are, we’ll all find ourselves, at some time in our life, in the midst of a medical crisis. Or, it may happen to someone we love. Certainly, no one is immune to old age, sickness, and death, but a meditation practice can help us make peace with this reality.

Of course I’d been told this when I first started practicing, but I didn’t realize how true it was until my new husband and I made the exciting (and frightening) decision to begin trying to conceive. Until then, I had no experience with medical emergencies. For a long time, I’d never even had a cavity. A procedure to remove an embedded IUD offered my first glimpse at how painful medical woes could be without a way to cope.

Two weeks earlier, what was supposed to be a simple procedure turned complicated when my gynecologist discovered my IUD had migrated out of place. One hard yank and out came a rust-colored copper rod—only part of what, for the past nine years, had successfully prevented unintended pregnancy.

“Can’t you go back up there and find the rest?” I asked the doctor. She scheduled me for surgery the following Wednesday.

I spent the weekend in a physical discomfort that the doctor hadn’t prepared me for. I was bleeding, cramping, and nauseated. “Was this normal?” I wondered. “Or was something seriously wrong?” Not knowing what was happening only made it worse. As everyone probably knows, Googling didn’t help. Neither, unsurprisingly, did fighting with my husband. By now, I’d begun to fear the worst: this whole situation might impact my ability to get pregnant.

By Monday morning, I was in a panic. I called a different doctor for a second opinion and she told me to come in. Three hours later, I was staring up at the ceiling, gripping a nurse’s hand while the doctor and an ultrasound technician tried to locate what was left of my IUD.

Pain comes in different forms: the sting of the needle, the smack of an airbag, or the snap of a breaking bone. Then there’s the avoidable suffering we lay on top, stories of worst-case scenarios and dreaded “what ifs”. The “I can’t be sick” or “If only I had…” or “This isn’t supposed to be happening. Not to me. Not now.”

Meditation can help ease with both physical and emotional discomfort. Rather than try and avoid them, a mindfulness meditation practice encourages the sufferer to stay present in the body and compassionately explore uncomfortable sensations and thoughts as they rise and fall. The practice literally changes the brain, as fear calms and physical pain is no longer felt with the same intensity. In clinical trials, patients suffering from chronic pain who were taught to meditate experienced both immediate and long-term health benefits. Some experts claim that regular meditators can reduce physical pain by over 90 percent.

During my procedure, I’d initially forgotten my own practice. Every time the doctor lowered her head and reinserted her forceps, I gritted my teeth. I tightened up and resisted. Doing so only made the situation more difficult for everyone. Resisting negative feelings and telling myself scary stories only made the pain worse.

It was in the midst of this painful procedure—and after a weekend of worry—that I realized I would need to up my meditation game, and develop an even stronger practice in advance of whatever life had in store. Knees in the air, I imagined the future I hoped for, and all the messy unwanted complications it promised: the pain of childbirth, the challenge of raising those kids, a lifetime and family full of bumps, bruises, fevers, and flu. My meditation practice would help see me through.

With that, I began to apply compassionate attention, and allow the experience to be what it was. Just as I relaxed, my doctor re-emerged. Between her bloodied forceps, she held a tiny piece of white plastic, the size and shape of a bent twist tie. I burst into tears of relief. It was over, I thought. It’s out. But it wasn’t over—less than three months later, I am three weeks pregnant. It has only just begun.

The author of this post is an editorial contributor to Headspace. These are their views, experiences and results and theirs alone. This contributor was paid for their writing.