SIMON Pegg’s 40th birthday back in 2010 was, the actor recalls, quite a memorable one. He was serenaded while standing on the gallows with a noose around his neck. Pegg was filming Burke and Hare in Scotland with the director John Landis at the time.

“I was stood on a gallows with a noose around my neck and John had 300 Scottish ‘peasants’ sing Happy Birthday to me. Which was the most surreal experience.”

At the time, Pegg was on the up professionally. He had spent the previous 10 years parlaying the success of his Channel 4 sitcom Spaced which he created with Jessica Hynes and his love of what would become known as geek culture, into, first, a movie career via Shaun of the Dead and Hot Fuzz and then a Hollywood movie career playing Scotty in the 2009 big screen reboot of Star Trek.

He’d also got married and become a dad. Life should have been good.

But that wasn’t the whole story. Since the age of 18 Pegg had periodically suffered from depression. During his twenties and thirties, he self-medicated. But by 2010 that had left him feeling unhappy, lost and, he revealed a couple of years ago, an alcoholic.

This is about the distance between then and now. Ten years on, all change. The career trajectory has continued on an upward ascent with Pegg adding the Mission Impossible franchise to his CV. And as for personally? “I am in a better place than I was, I think. I feel a bit more equipped to take on the notion of another decade.”

In short, he’s not too bothered about the prospect of turning 50.”Yeah, I think I’m pretty OK with it.”

His birthday is still a couple of weeks away when we speak. He is in the back of a car travelling from his home in Hertfordshire which he shares with his wife Maureen, their daughter Matilda and three dogs (“a standard schnauzer, a miniature schnauzer and a cockapoo”) to London to record voiceovers. Pegg is not long back from a snowboarding holiday in the Alps. Snowboarding has become something of a passion, he admits.

He is soon to start filming a new Mission: Impossible movie, but right now he’s talking to me about a much quieter venture.

Lost Transmissions, the directorial debut of Katharine O’Brien, is a small-scale but affecting film about music, mental illness and the inadequacies of American health care.

The film is coming to the Glasgow Film Festival and Pegg is happy to do his bit to promote it. He is proud of it and no wonder. It gives him a chance to channel his Peggness in a new direction.

In Lost Transmissions, in which he co-stars with Juno Temple, Pegg plays Theo Ross, a once successful musician turned music producer who is suffering from schizophrenia.

The fact that it’s something of a departure for Pegg was one of its attractions, he admits.

“I was very happy that Katharine O’Brien had sent it to me because it’s not the kind of movie I would ordinarily get sent and that immediately made me take an interest.”

Also, he realised, “I hadn’t actually done a movie that had been directed by a woman and that felt a little bit like something I needed to put right.”

Pegg makes a very creditable fist of portraying someone with mental problems, without lurching into histrionics. It manages to be a controlled representation of someone who is increasingly out of control.

There’s a responsibility in accepting the role. What he didn’t want to do was that performative notion of mental illness that Hollywood sometimes offers (the one I mention is Brad Pitt’s turn in 12 Monkeys).

“A lot of schizophrenics are quite insular and aren’t always acting out their delusions and acknowledging them publicly,” Pegg points out. “A lot of the turmoil they go through is internal.”

Before shooting started, he spent time with people with schizophrenia; some in recovery, some still in the midst of it. “It’s such a misunderstood condition. People see it as to do with split personalities. It’s far more complex.”

He describes the way the schizophrenic brain is attempting to do what every brain does: look for pattern, creative narratives, try to make sense of what’s going on.

It’s just that schizophrenia can lead to a very negative interpretation of reality. People who don’t suffer from it don’t have to contend with such a huge amount of information, he says. “The portal through which our perception comes is smaller if you will. In schizophrenics it’s really big. There’s a lot coming in and these things will be ordered into these bizarre, often quite comical narratives.”

The film also plays with but ultimately deconstructs the idea that madness and creativity are linked. It’s not a notion that Pegg has much time for. “There may be a moment of interest that occurs in a mind that’s not functioning properly. How that mind expresses art that might create something momentarily interesting. But it certainly isn’t an aid.

“A lot of artists do suffer from mental health issues but that doesn’t necessarily mean that’s the reason why they’re good artists. Van Gogh wasn’t a great painter because he was bipolar. He just happened to cope for a while with being bipolar and being a painter.”

We do a quick pop quiz to see how much Pegg shares with Theo in Lost Transmissions. Do you snore, Simon?

“I don’t know. Sometimes I get prodded in the night to turn on my side, so I presume I do.”

Did you ever want to be a pop star? “Not a pop star. Maybe an indie guitar hero.”

Can you play the piano? “No, but I did have to learn to mime it well. I was taught by the same piano teacher who taught Ryan Gosling for La La Land. It was all about body movement as much as anything else. My dad was a jazz pianist, but I never learnt.”

Have you ever been a DJ? “I have done, yeah. I like DJing. There’s a tendency these days with playlists to pre-DJ but the real joy is reading a room and playing the songs you feel are right in that moment.”

What’s your go-to tune? “Depends what kind of party it is. If it was an old-school nineties rave, I’d probably bring out Josh Winks’s Higher State of Consciousness.”

At which point readers of a certain age might be having flashbacks to Spaced, of course. The traditional take on Pegg’s career (as previously mentioned) takes the line that he translated his love of comic books and video games into a career. He effectively wrote himself into the world he dreamed about.

There’s an element of truth in that, he says, but it’s not the whole story. After all, he points out, though he made his name as a comic actor, that was never the plan.

“I didn’t set out to be a comedy actor. I fell into stand-up out of drama at university. I had aspirations of being at the RSC when I was a student. I wanted to be a serious actor.”

Instead, he became the comic foil in the Star Trek and Mission: Impossible movies. This is not to be sniffed at. To be honest, I tell him, the last two Mission: Impossible films were truly joyful cinematic pleasures. What are they like to be at the heart of?

“It’s a lot of fun. It’s kind of being in the midst of an organised storm; barely organised sometimes, it feels like. The way [director] Chris McQuarrie works … He’s such a brilliant storyteller and visualist and writer that he conducts the whole thing like a symphony. But a jazz symphony. We don’t always go on the script. He can sort of make it up as he goes along.”

Not the action sequences, he’s quick to add. Not ideal to be busking those. Does he ever worry that Tom Cruise is going to seriously hurt himself on set? “Every day. Last time he was lucky. He just broke his ankle.”

But that’s what makes the films special, Pegg suggests. Cruise does his own stunts and you can tell. “In an age of CGI, you can see an actor do anything and you sit there and kind of shrug.

“But if you know that an actor is actually hanging off that plane or flying that helicopter suddenly there’s a frisson of excitement that you haven’t felt for a long time.”

Pegg is about to start filming the next one. “I love working with Chris and Tom. I never look at those films as something I do for the financial reward. It’s not a ‘one for them, one for me’ kind of thing. I approach those films with the same interest and passion as I do the smaller things.”

Lost Transmissions is one of those smaller things. It was while shooting the film that Pegg first began to open up about his problems with depression and alcohol.

“What I had been through was very different to what happens in the film,” he says. Still, talking about the film and his own situation, it felt relevant in that he had always known that mental health issues can affect anyone.

“I think that’s something that needs to be put across.”

What both Pegg and the character he plays had in common was the pursuit of self-medication, I suggest. “Yeah, for different reasons. For Theo, he’s just interested in expanding his mind.”

When I read about his teenage depression, I tell Pegg, it made me wonder if we could reframe that young man’s love of comic books and movies as that of someone looking for escape from what troubled him?

He’s not sure. “At that age I wasn’t really looking for those temporary salves. It was a brief thing. It kind of subsided before I understood it particularly. I think when something becomes more long-term and more of a background noise you just want to make it go away, make it go quiet. That’s when people turn to things to try and distract them.”

You could read something in that slip from first person to third person in that answer perhaps. When, I ask, did he start to feel he was getting on top of his problems?

“In my 40th year, I think. That’s when I kind of just turned it all around. The thing you must understand is that that kind of stuff isn’t something you ever really get rid of. It’s a thing you learn to manage and understand. You can’t get complacent and think, ‘Oh, I’m better now.’”

There were false steps. During the promotion of the film Paul in 2011 he went AWOL for a few days. On returning home he knew things had to change and he checked himself into the Priory.

We talk a little about the idea of adulthood and what that word might mean. He suggests it’s to do with responsibility.

“I think if you have the correct reaction to becoming a parent then you shift the focus from yourself onto another person and you realise you’re not the most important thing in the universe any more,” he suggests.

It took him a while, but he got there.

Let’s return to that idea of the distance between then and now. In a way the comic books and videogames and horror and sci-fi B movies Pegg and, yes, many of us, loved as teenagers have moved to the mainstream. It’s already a cliche to say the geeks have inherited the Earth. Now, on the verge of 50, Pegg sounds a little detached from it.

“I think there’s a danger to some degree of our infantilisation,” Pegg says. He begins to talk about the concept of life stage dissolution; the idea that the natural stages of growing up are being undermined.

“In the First and Second World Wars people were becoming adults very young,” he points out. Now, he suggests, the opposite is the case.

“There’s probably a sweet spot to become an adult. I think being an adult is being someone who knows the difference between what’s important and what’s ephemera. Nowadays, you have adults who literally fight over details of Star Wars. They get so upset.

“I went through a period of that as well, I guess, in my twenties because of the Star Wars prequels. I had such a reaction to them. But you start to think, ‘Wait, wait. There has to be some separation.’

“I don’t mean don’t be passionate about what you love but understand the context.

“I think this idea that ‘Oh, the geeks won. Now comic books and science fiction are the stuff of the mainstream,’ is slightly naive. It’s been monetised and it’s been turned into something very, very commercial. And a desire to remain young and a desire to indulge in your childhood passions has been exploited. Not necessarily in a malicious way, but certainly taken advantage of; this desire for us still to be children, still be playing video games and watching comic book movies when we are in our forties and fifties and it not be seen as childish.”

That said, he adds, “I still watch horror films and science fiction films, but they just don’t feel as important to me any more. I don’t get fired up by stuff like that. It’s fun and there’s a place for fun. But that place has to be policed.”

In that case, is Lost Transmissions something of a marker for the way ahead for his own career perhaps?

“Oh yeah, absolutely. I’d love to do more varied things. Nick Frost and I have started this production company and we are developing a whole bunch of different types of show. Mainly television. We’ll try and get a few movies in there for the love of it, but TV seems to be where the fun is at the moment.”

Simon Pegg is nearly 50 and, he says, he would like to be thought of as someone who doesn’t just clown around in “various nerdy costumes”. He might be a grown-up now. He’s certainly trying his best to be.

Lost Transmissions is on at the GFT on Friday, February 29 and Sunday, March 1 as part of the Glasgow Film Festival. For more information visit glasgowfilm.org/festival

SIMON PEGG ON HIS GLASWEGIAN MARRIAGE

Pegg married his wife Maureen in 2005 in Glasgow, at St Simon’s Church, Partick Cross. “It was brilliant. I think we had the ‘half-Catholic’, we didn’t go with the ‘full Catholic’. There wasn’t all that standing up and sitting down business.

“It was lovely. We had our reception at Oran Mor. Parties are well thrown up there. So many people say that was the best wedding they've ever been to and I take that as a point of pride.”