James, 32, revealed in a new interview how the Duchess of Cambridge, 38, attended family therapy sessions with him during his recovery.
Speaking about his mental health to the Daily Telegraph, the entrepreneur - who recently got engaged to girlfriend Alizee Thevenet - said the mum-of-three played a key role, along with dad Michael, mum Carole and other older sister Pippa, in helping him tackle his mental health.
“All of them. Not necessarily at the same time, but either individually and [sometimes] together,” he said of which family members accompanied him to treatment, which involved just under a year of cognitive behavioural therapy.
James - who was 13 years old when sister Kate began dating Prince William - also spoke about the major depressive episode that culminated in him seeking help.
He recalled: “I couldn’t do anything. I couldn’t sleep, I couldn’t read a book, I couldn’t watch a film, I couldn’t eat. If I ate something it just sat there.
"I was just like, 'What am I meant to do?' I was better off in my own company, so I didn’t have the additional worry of someone thinking, 'What’s wrong with him?' I removed myself from everything."
The Duke of Cambridge’s brother-in-law added that he initially struggled to open up to his family.
However, they realised something wasn’t right and asked friends to intervene and encourage James - who also has dyslexia and attention deficit disorder - to seek help.
He checked himself into a private psychiatric hospital, and it was during therapy sessions that he first admitted to having experienced suicidal thoughts.
Kate’s brother said the presence of one of his five dogs, Ella, gave him support during this dark period, as did Stephen Fry’s audiobook narration of the Harry Potter novels.
He now looks after his mind through exercise - such as long-distance running, cycling and skiing - and also credits meeting his French financier fiancée with helping get him feel good again.
James proposed earlier this month to Alizee, 29, in the Lake District - one of the first places they visited after meeting at the South Kensington Club, when Ella ran up to her by chance.