Kate Middleton's brother, James, revealed his secret longtime battle with depression.

James Middleton, 31, described his "morass of despair" in an editorial for The Daily Mail, saying that the condition began creeping in around the end of 2016, but that he kept it quiet for more than a year.

PIPPA MIDDLETON REVEALS BIKINI BODY 11 WEEKS AFTER GIVING BIRTH

"I couldn't communicate, even with those I loved best: my family and close friends," James wrote. "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."

CLICK HERE TO GET THE FOX NEWS APP

James revealed that he also suffers from severe dyslexia, as well as adult attention deficit disorder. His anxiety and stress were so bad that he was also diagnosed with an arrhythmia, but still refused to seek help until he considered suicide. At that point, he finally called his doctor and sought help.

THE LOVELY KATE MIDDLETON

Instead of taking his own life, he took his beloved dogs to Lake District National Park in England, where he began to feel at peace.

"Although I'd never say I am cured of it [depression] — now I understand it and, with professional help, have worked out strategies for coping. Today, I feel a new sense of purpose and zest for life," James says. "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."

KATE MIDDLETON REVEALS ROYAL RULE FOR PRINCE GEORGE AND PRINCESS CHARLOTTE

He's ultimately happy for the struggle, because it made him stronger.

"Today — hard as it is to admit this — I am pleased I went through debilitating depression because I now have the skills to fight it... The end result of this journey has been a positive one. If I could leave you with just one thought, it would be this: 'It's OK not to be OK.' "