Cobie Smulders is crediting a topless photoshoot with helping her overcome body issues after she was diagnosed with ovarian cancer in 2008 at the age of 25.

While at first unnatural, Smulders says posing topless during that 2015 covershoot for Women’s Health helped her feel in touch with her body again.

“It was a very strange day. I was standing in front of a camera lens in my underwear and holding my breasts, all while trying to appear not sexy but confident, not flirtatious but gleamingly positive,” she pens in an essay for Lena Dunham’s newsletter Lenny.

RELATED: Cobie Smulders Dishes On ‘Dysfunctional’ ‘Jack Reacher’ Family

“It all made me start thinking about this body that I’m in. And what it has been through. And suddenly this bizarre invitation became an opportunity to share some insight from my experience of being diagnosed with, receiving treatment for, and eventually learning to cure my cancer,” the actress writes.

Smulders opens up about her emotional state after learning of her cancer diagnosis.

“Just when your ovaries should be brimming with youthful follicles, cancerous cells overtook mine, threatening to end my fertility and potentially my life. My fertility hadn’t even crossed my mind at this point. Again: I was 25,” Smulders recalls in her essay. “Now I was being told it was most likely not a possibility to create my own children. It felt grossly unfair.”

RELATED: Cobie Smulders on Her Battle with Ovarian Cancer: ‘It Was a Very Hard Time For Me’

The Vancouver-born actress says she spent four months preparing for the surgery by getting her body healthy by doing yoga, visiting chiropractors, acupuncturists, and crystal healers, and having what she calls a “devastating breakup with cheese and carbohydrates”.

Nearly 10 years after her diagnosis, the “Jack Reacher: Never Go Back” star is grateful for the family she has with her husband, actor Taran Killam.

“Thankfully, gratefully, cancer did not get the best of me,” she writes.  “The best of me now lives on in my two little women, baby girls I was lucky enough to be able to make with my own body.”