Updated

Irish actress Evanna Lynch has wowed "Dancing with the Stars" fans this season — but few probably know she once could have lost her life to an "eating disorder."

The ethereal "Harry Potter" star, who played Luna Lovegood, opened up about how she suffered from what she's previously revealed to be anorexia, according to Ireland's Independent.

For the "DWTS" Monday night "most memorable year" episode, Lynch, 27, told the cameras that she suffered from the eating disorder when she was 11 and 12. "Anyone who’s had an eating disorder knows it completely takes over your life," she noted. "The only thing that could actually take my attention apart from that was the 'Harry Potter' series."

Lynch started writing to the books' famed author J.K. Rowling, and the two became pen pals.

"I was in and out of hospital and I would be getting these letters," the actress told the cameras, adding that Rowling's "books and her kindness really made me want to live again."

She got her role in "Harry Potter" in 2006, unbeknownst to Rowling. The writer was thrilled to later hear the news from Lynch that she would be playing Lovegood.

Backstage after "DWTS," Lynch elaborated to reporters about her past illness, "I was in hospital for weeks. I was the lowest I've ever been.

"I was in such a dark place. All I could think about was exercising and getting thinner and calorie counting, being perfect.

"And then, it was so dark and consuming, and then when I would read those [Harry Potter] books that would be the only time I would actually get a reprieve from those feelings.

"It could make me see a different kind of life for myself. It was very profound."

Lynch said Rowling, 53, really inspired her. "When someone you love and adore that much encourages you, it makes you listen, in a way I didn't really listen to my family or friends when they were trying to help. She really did help," she said.

Lynch told Fox News she recovered from the eating disorder because she fell in love "with other things."

"I think love and light is the antidote to any kind of darkness. I fell in love with acting, dancing, and books and things and I'd be like, maybe it's worth giving up my eating disorder for these things. Maybe recovery is worth it," she said.

Lynch earned a strong score of 27 out of 30 for her Monday night Viennese waltz with partner Keo Motsepe to the "Harry Potter" John Williams song, "Hedwig's Theme."

Lynch admitted backstage that she will likely battle negative thinking for the rest of her life, such as "telling yourself that you're going to fail or you're worthless."

But she reached a point where the eating disorder had made her "exhausted. I was just like, I want more out of life."

"I don't think I would ever relapse," she said.

Lynch believes recovery is about "finding things that you love more than that need to self-destruct."

"There is hope."