For most of us, the pursuit of happiness is all-consuming. Whether we're literally buying into Madison Avenue's promises or looking to religion to provide the answers, there's a certain elusiveness to that quest Kid Cudi once rapped about and that drives the new comedy Hector and the Search for Happiness (in theaters today). Hector, played by Simon Pegg​, is a quirky middle-aged psychiatrist who, seemingly out-of-the-blue, decides to embark on a journey to try and learn what it is that makes people happy. He leaves behind not only his humdrum life, but also his girlfriend, Clara (Rosamund Pike), much to her chagrin.

"The script actually made me laugh when I first read it," says Pegg. "We start off from the point where you take the least sympathetic demographic in the world, which is the white middle-class man, and say: 'Let's give him a problem and see if anybody cares.' I thought that was a fairly good thing to do.”

To prepare for the role, Pegg picked the brains of several psychiatrists over dinner—meaning, a free therapy session. "A lot of opinions have been formalized about the nature of happiness just by talking about it,” he says. “I feel like I've learned more talking about this film than making it, to be honest." According to Pegg, everyone can be susceptible to depression. It doesn't matter if on the surface you have the "supposed ideal life" with all of its trappings, like a big house, money, and wife. "You can still experience the numbness and malaise and inability to perceive what happiness is," he explains.

There's a reason why we live in a society that employs a lot of psychiatrists. "We don't have any real idea of what happiness is because we don't have to worry about being killed in our sleep or starving to death," says Pegg. "We don't have the problems we would face in the wild. We have nothing to worry about, so we are constantly being given proxies for happiness." We're constantly being told what to eat, wear, watch, and do to pave our path towards happiness. "And these things aren't the key to it," argues Pegg. "Happiness comes from being alright with your place in the world and understanding something on a deeper level because when you have that you can enjoy all those things, otherwise all these things are just quick fixes.”

For Pegg, being okay with his place in the world comes from remaining a kid at heart. "For me it has been about getting older but retaining a child-like kind of [mindset], to stay in contact with the first time you reacted to something like love, relationships, loss—trying to remember what your first perception of those things was.” Playing "Scotty" in J.J. Abrams’ Star Trek universe, for example, may seem like just another acting gig to an adult actor, but it’s an entirely different experience for a child. "My 7-year-old self would think about that and he would be absolutely fucking apoplectic with joy to be cast in Star Trek,” says Pegg. "I try to access that. It helps me maintain a healthy kind of wonder about life.”

The fable-like Hector and the Search for Happiness is a tale about a man who's disconnected from the child in him, yet told from the point-of-view of his childhood self. "It's told like a kid would describe what the world is like," says Pegg. "He goes to China and it's all mystery and temptation, Africa is the mythic dark continent where there are lions and warlords, and America is the new world that has all this technology and these hippy guys. It's kind of a childish view of the world." But until he comes to terms with his place in the world, Hector cannot communicate with his childhood self and become one.

Cynicism is the inability to see life as a child. Pegg explains, "You're weighted down by responsibility and mortality and all the shit you get as an adult that drags you down and stops you from seeing life in your childlike way." Not that all cynicism is bad. He adds, "To be realistic is not a bad thing but to have your entire being colored by a sense of 'what the fuck, what's the point' is a shame.” As Christopher Plummer says in the movie, "We become a colony of morose depressives" as we get older. "It's something to do with our lives being temporary," says Pegg. "If you can be OK with all of that, you can be happy."

For Pegg, becoming a father has made a major difference is his life and attitudes. "Having a child has been a key to understanding what my happiness is,” he says, “and understanding that I'm not the center of the universe was a relief." As Pegg sees it, every person thinks they are the center to some degree, but having a child takes you out of yourself and focuses you on the well-being of someone else. It also gives you a sense of genuine purpose. "I'm not just trying to amuse myself like some selfish egomaniac," he laughs. Not like previously. "Only until the age of 39.”

Hector's decision to make the journey is abrupt. After spending years seeing patients in similar situations to his, moaning about their lives and "first-world problems," like the woman who complains about having a nanny for only five days a week, he's finally had enough. "These people shine a light on him in a way," says Pegg, "and it gives him the suspicion that he might be just like them." He calls his trip "research," but with a gun literally to his head, he admits that he's actually there to find out if he can be happy.

And what exactly is happiness? "Happiness facilitates your ability to enjoy things," says Pegg. It's not a walk on the beach, or a pizza—it's not a lot of the things we're told, but happiness allows you to enjoy those things. "You have to have a degree of personal contentment and be OK with the world.”

Listening to Pegg define and discuss the nature of happiness, he seems miles away from his psychiatrist alter-ego at the start of the movie. The busy actor has settled into family life with joy, while finding excitement from working on indie films and blockbusters (Star Trek, Mission Impossible) alike. "I'm not one of those guys who does one for them and one for me," he says, "I don't do the big films so I can do my smaller earnest films—I love them all.” Pegg is currently in the midst of shooting Mission Impossible 5 and he's quick to admit that he's having a "blast" working on it. "Those films are fun because they are huge, silly, and pure entertainment, and there is a place for that. Anyone who sort of frowns on big movies is a bit of a snob. There's room for fun in this world, there's room for just adrenaline-fueled pure entertainment as much as there is for earnest, thought-provoking kind of movies. I like to mix it up." And, let's face it, watching an SUV blow up is quite fun.

Shooting Hector was a different experience, of course. Sometimes it meant staying in the "meanest of accommodations" in places like Tibet instead of five-star hotels, and being "down and dirty." But that was an experience Pegg enjoyed too. "It felt like we were making something guerrilla style—there's different values to be had in the huge productions and the small ones.”

In the end, making Hector and the Search for Happiness helped Pegg realize what happiness is not. "Happiness isn't something you just achieve and you stay there," says Pegg. "It's not like you arrive at planet happiness and it's your life. It's something that you experience along the way and you can't really experience it with any kind of purity unless you experience everything else. You have to experience the lows as well. We define light by what it's not. We define light by the dark. You have to go through the bad stuff to really, truly, when you are happy, experience happiness properly. I'm just a bit more OK with all that now. I try to see the sad bits as temporary, all part of the process."

Katherine Brodsky is a contributing writer. She tweets here.