Stephen Fry says he has moved on from the “mad compulsion” which led to a suicide attempt last year and is on effective medication for the first time “that really seems to be working”.

The gay actor, author and comedian revealed in June he had attempted to take his own life in 2012.

Fry, president of mental health charity Mind, is bipolar.

The incident happened as Fry was abroad filming a documentary on homophobia for the BBC.

Part 1 of ‘Stephen Fry: Out There’ will be shown on Monday 14 October on BBC Two at 9pm.

In an interview to the Press Association, the broadcaster said filming the production became too much – as he encountered such entrenched homophobic views.

“There’s a moment in the film where I recognised that this was the last moment we filmed before this wave of depression came over me, and I was idiotic or victim enough, or whatever one wants to call it, of this mad compulsion.

“It seems mad now because I’m on a course of medication for the first time in my life that really seems to be working so it does feel really strange. But at the same time I can recognise that moment.

“And I won’t say what it is because I don’t want people to look out for it then, but of course it makes my heart sink a little because I think that’s so odd because it’s such a really wonderfully important part of the film and it’s a very pivotal moment.

“And I asked myself if there was a connection between the despair that swept over me whether it was triggered by or at least reinforced by the despair that swept over me at the sheer weight of official homophobia that I was experiencing at that particular point of filming. But I’m glad to say at the moment things are much better.”

Fry said: “Homophobia stands on a tripod of three preposterous lies – a decent and normal person can see they’re lies but somebody who is either themselves poor or feels dispossessed or is looking for someone to blame can follow those lies.

“One that it’s a choice, two that we want to recruit and the third even more pernicious one is that we’re after children in, not just recruitment, but that we actually want to abuse them – and that is just wickedness. There’s no more logic in that than saying heterosexuality is wicked because of paedophilia of men against little girls.”

In his PA interview, Fry denounced the idea that being gay is somehow a “lifestyle choice”.

“Who would choose to be gay in Iraq or Iran where you could literally be thrown into a pit of fire? It’s just absurd,” he said. “Plus I only have to think of my own example I grew up in a culture which basically told me to be straight because the second lie is recruitment that gay people want to recruit the young into being gay.

“It’s a bizarre idea. I’ve never wanted one extra gay person in the world, there are plenty of us around. In fact the boot’s on the other foot – I do know a lot of women saying, ‘Oh, why do all the boys I like turn out to be gay?’ they’re the ones who want to do the recruiting and the promoting of heterosexuality, but I grew up in a world in which heterosexuality was entirely promoted.”