The actor Christopher Eccleston has spoken for the first time about his poor mental health, revealing that he has lived with eating disorders and had considered suicide.

The Doctor Who actor was praised by charities for his bravery, after writing in his forthcoming autobiography that he was “a lifelong body hater”.

“Many times I’ve wanted to reveal that I’m a lifelong anorexic and dysmorphic,” he wrote in I Love the Bones of You. “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.”

The 55-year-old said he had been ill with the eating disorder during the filming of Doctor Who. “The illness is still there raging within me as the Doctor,” he wrote.

“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.”

Eccleston wrote that he was diagnosed with clinical depression after separating from his wife in 2015, a period during which he considered killing himself.

“I was in a state of extreme anxiety, convinced I was either going to die or I was going to kill myself. In my despair I reached for my phone and looked up a psychiatric hospital, I rang ahead, grabbed my bag and ran.”

He said that being prescribed antidepressants had helped his recovery. “I am on them to this day. I could be on them for the rest of my days. I do have an issue with that,” wrote Eccleston.

“I would like to attempt slowly to reduce the dose, to experience reality again, to see how I do … And yet, interestingly, I have received some of the best reviews of my life since I started taking them.”

A spokesperson for the eating disorder charity Beat said it took courage to speak about having anorexia. “Doing so helps to combat the stigma and misunderstanding that exists around these serious mental illnesses, especially for men and boys,” they said.

“We hope that Christopher has received the support he needed and that his bravery will encourage others to seek help, as we know that the sooner someone gets help for an eating disorder, the better their chances of recovery.”

• For help and advice on eating disorders in the UK, contact Beat on 0808 801 0677; in the US, contact the NEDA on (800) 931-2237; and in Australia, contact the Butterfly Foundation on 1800 33 4673. In the UK and Ireland, Samaritans can be contacted on 116 123 or email jo@samaritans.org or jo@samaritans.ie. In the US, the National Suicide Prevention Lifeline is 1-800-273-8255. In Australia, the crisis support service Lifeline is 13 11 14. Other international helplines can be found at www.befrienders.org.