Ruth Davidson has insisted there is no “contradiction whatsoever” between her desire to be first minister of Scotland and her ruling out ever becoming prime minister because of the impact it would have on her mental health.

The Scottish Conservative leader said she had felt a “compulsion” to open up about her struggles with mental illness, having revealed recently she had self-harmed while at university.

She was diagnosed with clinical depression when she was a student, and said: “I think if I ever walked off the stage, many years from now I hope, and I had never ever let anybody know, I would feel like I had sort of failed people, because it would have made such a difference to me when I was 18 to have heard anyone talk about this, and nobody did back then.”

She spoke about her mental health problems at an event in Edinburgh organised by The Times Scotland.

It came just days after she ruled out ever standing to be prime minister, telling The Sunday Times: “I value my relationship and my mental health too much for it. I will not be a candidate.”

The event also coincided with the launch of Ms Davidson’s first book Yes She Can, for which the former journalist interviewed a number of inspirational women.

She said she had wanted to speak about her mental health “for a while”, and added: “When the book came along it was a way that I could.

“And it’s a really odd thing to explain, but it did feel a little bit like a compulsion.”

Ruth Davidson and Theresa May
Ms Davidson has said she has no desire to follow in the footsteps of Theresa May into Number 10 (Stefan Rousseau/PA)

After being diagnosed with depression, she said the treatment she was given consisted of “here’s some pills” – adding that when she went back to complain she was feeling worse, her dosage was upped.

She now turns to “structure, exercise, forward momentum” when feeling anxious, as she made clear her mental health problems do not prevent her from wanting Nicola Sturgeon’s job.

Ms Davidson said: “I’ve got a big job I want to do, it’s right here in Edinburgh, it’s at Bute House.

“I live three-and-a-half miles from Bute House, I’m the MSP for Bute House. I want to be the MSP in Bute House.

“Scotland is my home, I am of this place and I am intensely ambitious for my country and intensely ambitious for my party, and I’m intensely ambitious for what we can do in politics in Scotland if we are not squabbling about the constitution all the bloody time.

“I don’t see a contradiction whatsoever. I’m incredibly privileged, I get to see behind the door of Number 10 Downing Street, and I don’t want it. What I want is here.

“That’s where my life is, that’s where my family is, that’s where my future is.”