“Doctor Who” star Christopher Eccleston opened up for the first time about his lifelong battle with anorexia, and said that he was even suffering from the eating disorder during the filming of the hit show.

In his upcoming book, “I Love the Bones of You: My Father and the Making of Me,” Eccleston revealed the illness was “raging within me as the Doctor,” and that he checked into a psychiatric facility in 2015 after contemplating suicide following a split from his wife, Variety reported.

OREGON LOTTERY CHAMP, A 2-TIME CANCER SURVIVOR, WINS $4.6M

“Many times I’ve wanted to reveal that I’m a lifelong anorexic and dysmorphic,” the 55-year-old writes in the book, which is due out on Sept. 19. “I never have. I always thought of it as a filthy secret, because I’m northern, because I’m male and because I’m working class.”

Anorexia nervosa is an eating disorder characterized by weight loss, difficulty maintaining an appropriate weight and distorted body image, according to the National Eating Disorders Association. People with anorexia typically restrict the number of calories and types of food they eat, while some may also exercise compulsively, or purge and then binge eat.

The eating disorder can affect people of all ages or genders, and while it frequently strikes in adolescence, it can also be diagnosed in younger children or older adults.

CALIFORNIA MAN'S VAPING-RELATED DEATH MARKS 7TH IN NATION

“A person does not need to look emaciated or underweight to be struggling,” according to the National Eating Disorders Association. “Studies have found that larger-bodied individuals can also have anorexia, although they may be less likely to be diagnosed due to cultural prejudice against fat and obesity.”

Eccleston, who starred as the ninth Doctor on the long-running sci-fi show, revealed that he still remains on anti-depressants and that while many fans adored the way he portrayed the Doctor on the show, he was actually “very ill.”

CLICK HERE TO GET THE FOX NEWS APP

“The illness is still there raging within me as the Doctor,” he writes in the book, according to Variety. “People love the way I look in that series, but I was very ill. The reward for that illness was the part. And therein lies the perpetuation of the whole sorry situation.”

[Editor's note: This story discusses suicide. If you or someone you know is having thoughts of suicide, please contact the National Suicide Prevention Lifeline at 1-800-273-TALK (8255).]