James Middleton has revealed his secret battle with depression.

The 31-year-old entrepreneur called his illness a ''cancer of the mind'' and said he decided to speak openly about his mental health struggles after being inspired by his sister Duchess Catherine, her husband Prince William and Prince Harry, who are advocates for mental health.

In an article he wrote for the Daily Mail, James explained: ''I feel compelled to talk about it openly because this is precisely what my brother-in-law Prince William, my sister Catherine and Prince Harry are advocating through their mental health charity Heads Together.

''They believe we can only tackle the stigma associated with mental illness if we have the courage to change the national conversation, to expel its negative associations. So it wouldn't be honest to suppress my story. I want to speak out, and they are my motivation for doing so.

''I know I'm richly blessed and live a privileged life. But it did not make me immune to depression. It is tricky to describe the condition. It is not merely sadness. It is an illness, a cancer of the mind.''

Speaking about his illness, James revealed that it completely took over his life for a year, until he sought treatment over 12 months ago.

He wrote: ''During the day I'd drag myself up and go to work, then just stare with glazed eyes at my computer screen, willing the hours to tick by so I could drive home again,'' James wrote.

''Debilitating inertia gripped me. I couldn't respond to the simplest message so I didn't open my emails.

''I couldn't communicate, even with those I loved best: my family and close friends.''

James - who has also been diagnosed with Attention Deficit Disorder (ADD) - went on to explain that although he never contemplated suicide, he ''didn't want to live in the state of mind'' he was in either.

However, he contacted his doctor who put him in touch with a therapist and he feels that he now has his illness under control.

James also revealed that he asked his doctor to initially explain his condition to his family and he praised them for helping him ''enormously''.