Rebel Wilsonexperienced a special connection between life and art while working on her new film.

The actress, who plays a woman trying to help her husband recover from a traumatic brain injury in IFC Films' upcoming movieThe Almond and the Seahorse, recently shared the backstory with PEOPLE about returning to more dramatic roles.

“During the filming I received some terrible news that all my harvested eggs up until that point had not survived being thawed,” the actress shares.

Never miss a story — sign up forPEOPLE’s free daily newsletterto stay up-to-date on the best of what PEOPLE has to offer, from juicy celebrity news to compelling human interest stories.

Courtesy of IFC Films

Rebel Wilson a s “Sarah” in Celyn Jones’ and Tom Stern’s THE ALMOND AND THE SEAHORSE.

“So I’d lost a huge amount of weight and been through 3 surgeries at that point and no viable embryos,” she explains. “It was devastating.”

Yet, she says, “I knew that my desire to become a mother was so strong, that I needed to keep trying.”

“It was feelings of loss, feelings of hope — and it all played into my performance,” says Wilson. “It was a very emotional time.”

rebel wilson/Instagram

https://www.instagram.com/rebelwilson/?hl=en

Noting that she is “forever grateful to everyone who has been involved,” Wilson said the process “has been years in the making.”

Vivien Killilea/Getty

WEST HOLLYWOOD, CALIFORNIA - MAY 10: Rebel Wilson attends the Netflix Senior Year Special Screening at The London West Hollywood at Beverly Hills on May 10, 2022 in West Hollywood, California. (Photo by Vivien Killilea/Getty Images for Netflix)

“Particularly wanted to thank my gorgeous surrogate who carried her and birthed her with such grace and care,” the new mom wrote. “Thank you for helping me start my own family, it’s an amazing gift. The BEST gift!!”

source: people.com