Lena Dunham posted a photo from her hospital stay Friday on Instagram after having a hysterectomy.

The 31-year-old actress shared the picture with her 3.1 million followers after announcing she underwent an elective total hysterectomy in hopes of ending her battle with endometriosis.

"Your body failing you is a loss that's hard to explain and yet the amount of messages I've gotten from women in a similar predicament has been so overwhelming, loving and heartening," Dunham captioned the snapshot.

"Thank you to the village of women who took care of me through this entire process," she added. "I have a broken heart and I hear those don't mend overnight, but we are linked forever by this experience and our refusal to let it hold any of us back from even the grandest dreams."

Dunham said in an essay for Vogue published Wednesday that she chose to have a hysterectomy after "years of complex surgeries measuring in the double digits" and many alternative treatments for endometriosis.

"It's been a few months now. Despite some small complications ... I am healing like a champ," she wrote. "My mind, my spirit, are another story ... I made a choice that never was a choice for me, yet mourning feels like a luxury I don't have."

Dunham's ex-boyfriend Jack Antonoff was among those to voice support for the actress online. Dunham and Antonoff confirmed their split in January after five years of dating.

"beautiful piece," Antonoff tweeted Wednesday alongside a link to Dunham's essay.

10 Celebrity Divorces That Rocked Hollywood

By Annie Martin, UPI.com

Copyright © 2018 United Press International, Inc. All Rights Reserved

More From KKRC-FM / 97.3 KKRC