(CNN) -- Sarah Hyland is doing well after a series of medical issues left her in and out of hospitals over the last few years.
In a revealing interview with Self magazine, the "Modern Family" actress opened up about receiving a second kidney transplant and her endometriosis, a condition that occurs when tissue lining the uterus is found outside of the uterus.
Hyland, who has kidney dysplasia, had her first transplant seven years ago. Her father was the donor.
Two years ago, Hyland said, her body began rejecting the kidney, which had to be removed in May 2017. During that surgery, doctors also discovered she had an abdominal hernia.
"When a family member gives you a second chance at life and it fails, it feels like your fault," Hyland said. "And it's not."
The ordeal left Hyland "very depressed," and she even contemplated suicide, she told the magazine.
"I had gone through 26 years of always being a burden, of always having to be looked after, having to be cared for because I've always had health issues. And it's a really helpless feeling," she said. "Things like this can be really hard on a person."
Hyland underwent dialysis from February to October 2017. During that process, it was discovered her younger brother was a match.
She had her second transplant in September 2017.
In spring 2018, she also had surgery to treat her endometriosis and another to repair her hernia.
After six surgeries in a year and a half, Hyland says she's now "stable" and "super happy with life."
™ & © 2018 Cable News Network, Inc., a Time Warner Company. All rights reserved.