Image copyright Johan Persson Image caption The cast of Reasons To Stay Alive in rehearsals

Twenty years ago, Matt Haig walked to the edge of a cliff and wrestled with the question of whether to jump.

This week, he will watch an actor playing him walk to the edge of a (fake) cliff and wrestle with the question of whether to jump. Then he will watch another actor playing an older version of himself talk his younger self out of it.

The prospect of seeing his life story on stage, Haig says, is "exciting, but it's also very weird".

And it is his life story.

The play is an adaptation of his book Reasons To Stay Alive - part memoir, part self-help manual - in which he eloquently evoked the crushing depression and suffocating anxiety that overcame him in September 1999. It then recounts how, with the help of his parents and girlfriend Andrea, he slowly got back to something like stability.

Image copyright Getty Images Image caption Matt Haig: "We absolutely never know what sort of person we will be in the future"

As Haig puts it, the new play dramatises "the most intense experience of my life and some of the worst days of my life". The author has had little hands-on involvement in its creation at Sheffield's Crucible theatre, however.

"I've given them a relatively free rein," he says. "The only thing I said as a caveat at the meeting was, 'You can do what you want with me and Andrea, but please go gentle on my parents'. I'm totally OK with all the warts and all stuff, but with my parents it's a bit more awkward.

"I've made them promise not to go [and watch] on the same night as me because I think I'd spontaneously combust with awkwardness."

On that cliff top in Ibiza in 1999, 24-year-old Matt didn't have the benefit of his older self to tell him that everything would be OK. He was terrified of living, with no prospect - as he saw it - of the pain easing. But he was equally terrified of dying, and leaving his loved ones behind.

If the older Matt really had been able to enter at that point, he could have told his younger self that, after stepping back from the cliff edge, as well as writing about his depression, he would go on to write award-winning novels and children's books (one of which would be turned into a film by Netflix, and another which would be optioned by Benedict Cumberbatch).

Oh, and he'd marry Andrea. And have a family. And a dog.

What would the young Matt have made of the fact this play is telling his story? "Honestly, any of it would be just almost too surreal to comprehend," the 44-year-old replies.

"Becoming a published author at that point would have been beyond anything I could have imagined or thought I was capable of. And the fact that I'd be writing about that experience would have been beyond anything I would have understood.

"And also the fact that I was still here. I was in such a desperate state that I didn't think I'd make it to 25 years old.

"I think there's a lesson in that for everyone, really, in that we absolutely never know what sort of person we will be in the future. Every single person changes."

Image copyright Johan Persson Image caption The play opens at Sheffield Crucible on Friday before a UK tour

Reasons To Stay Alive was meant to be a side-project in between Haig's fiction works, but the chord it struck was so sizeable that the book ended up staying in the UK top 10 for 49 weeks and being published in 29 countries.

"When I was ill, my big thing was that I felt very alone and very misunderstood. And I didn't even understand myself," Haig says.

"Back then, there were a lot of very heavy, very academic, quite depressing books about mental illness. But there wasn't anything that accessible. So I wanted to create something that people could relate to."

Its candid and beautifully-written insights and tips achieved that. The most difficult part of writing something people could relate to, the author says, was fielding messages from others who were going through similar things, and suddenly discovered someone who understood.

"I was getting contacted a lot by people who were in a very vulnerable states, or ill, and even suicidal," he says. "And a lot of the time I felt it was something I had to respond to. And I'm not a doctor. I'm not a Samaritan. I didn't necessarily know what I should or should not be saying. So that was tricky at the start."

He now has contact details for support organisations on his website, and occasionally tweets them. The play, like the book, will "open a little window" onto depression and anxiety, he hopes.

The script has been written by April De Angelis, and the idea for the play came from director Jonathan Watkins, whose background as a choreographer means he is using movement and music to help express the emotions that dialogue alone might struggle to convey.

"In the book, he says sometimes words weren't enough," Watkins says. "I use words when we want to use words, and I want to use movement when words aren't enough."

'Such an important book'

Younger Matt is played by Mike Noble, while older Matt is played by Phil Cheadle, who read the book before taking his audition.

"I was deeply moved," the actor says. "It struck me that it's such an important book. And it is not only a book that can be of use to people who live with mental health difficulties, it's also a book that I think that can resonate on a wider scale, and actually provide a lot of hope to anybody who might be experiencing difficulties. I also had a lot of friends really struggling, so it's quite personal."

Suicide is the single biggest killer of males under the age of 45, and despite a greater openness about subjects like depression, helped in part by people like Haig, last week it was revealed that the suicide rate in the UK had risen for the first time since 2013.

Ultimately, Cheadle says he hopes that through telling one person's story, the play can reach many more.

"Matt's book shows the warts and all of what it is like to be in the midst of depression or anxiety," he says. "There's a lot of lightness in it and humanity. But ultimately, there's a lot of hope.

"There's a lot of hope that there is a light at the end of the tunnel. The book does that fantastically well, and I hope our production brings that out."

If you would like support, you can phone The Samaritans on 116 123 or email jo@samaritans.org. Calm can be contacted on 0800 58 58 58 (17:00-midnight). Details of other organisations that can help are on the BBC Action Line website.

Reasons To Stay Alive runs at Sheffield Crucible from 13-28 September before a UK tour.

Follow us on Facebook, on Twitter @BBCNewsEnts. If you have a story suggestion email entertainment.news@bbc.co.uk.