Mo Gawdat's LinkedIn profile reads like a how-to playbook for success. He worked for IBM and Microsoft; he was a VP at Google and then chief business officer for Google X, the famously secretive "moonshot" factory known for tackling with innovation some of largest problems affecting the world.
But as quickly as Gawdat, now 51, found success in the tech world, it took him much longer to understand that it was not enough to make him truly happy.
"I am the typical driven businessman engineer who solves problem with his left brain. And that got me to a corner early in my life where I was extremely successful — like scary successful — at age 28. But completely depressed," Gawdat tells CNBC Make It.
At a high point of his success Gawdat says he had a handsome salary, two company cars and a massive villa with a swimming pool; he traveled first class, "it was incredible," he says. He was living in Dubai at the time and also had a day-trading side gig. "[I] made double-digit returns every single month of my life. Right? And you know my math skills I developed my own little algorithm and I made a ton of money — market going up, going down, I was just making money, nonstop.
"And I wasn't happy."
One night he even bought two vintage Rolls-Royces online. "Why? Because I could. And because I was desperately trying to fill the hole in my soul," says Gawdat in his 2017 book, "Solve for Happy: Engineer Your Path to Joy." "You won't be surprised to hear that when those beautiful classics of English automotive styling arrived at the curb, they didn't lift my mood one bit."
It was a hard realization for Gawdat.
"When you're unhappy but you haven't made it yet, you go, like, 'Yeah, when I make it, I'm going to be happy.' Right? No, I made it," Gawdat says, speaking with CNBC Make It at the Northside Music and Innovation Festival in Brooklyn, New York in June. "I had everything that everyone's dreaming of: I had the wonderful wife, two amazing children, right? And I wasn't happy.
"So it gave me a wake up call and I had to research the topic."
Gawdat approached happiness the way he had approached everything in his life up to that point — with logic.
"I read every book I could find, watched every documentary, spoke to people who seemed constantly happy, to spiritual teachers, and scientists. I also conducted my own little experiments observing my conditions and that of coworkers, friends and family to reformulate what I learned in a scientific engineering way," Gawdat tells CNBC Make It.
What Gawdat found was that happiness is not something that can be obtained externally.
"It basically starts with a simple assumption — which is incredibly eye-opening — that happiness is not outside you; you don't strive to attain it. Happiness is ... within you," Gawdat says.
"Until your basic needs are met, your every dollar more that you earn makes you happier of course.... But once you get your basic needs met more money doesn't make you happier," Gawdat explains. "There is nothing that you can do to achieve happiness by buying it."
If you look for it in external sources, says Gawdat, that only results in temporary satisfaction. "The minute you got it, you started to pause and say, 'OK, where's the next goal?' Especially driven entrepreneurs. They will move from goal to goal — it's almost as if the goal is constant moving."
Gawdat also realized something else — in the absence of unhappiness, he was happy. "So I took that and I started to develop the equations that triggered unhappiness, which was really, really eye-opening."
To do so, Gawdat identified happy moments in his life — his "happy list" — and plotted them on charts. He looked for the trendline relating the happy moments in his life.
"My list is not much different than that of others. It contains simple moments ... I feel happy when I have a good cup of coffee. I feel happy when my daughter, Aya, smiles. I feel happy when I learn something new. I feel happy when I achieve something of impact or I feel happy when I am with people I love," Gawdat says.
Gawdat boiled down what he saw into "one simple equation, which basically says your happiness is equal to or greater than the difference between the events of your life and your expectations of how life should behave," he says.
For example, says Gawdat, "Rain never made you happy or unhappy on it's own. Rain in isolation doesn't have a happiness intrinsic value." Instead, how wet weather affects what you wanted to do on the day it rained is what makes you happy or unhappy, he says; a farmer who needs to water his field is grateful to see rain, while someone who had hoped to lay by the pool would be unhappy to see rain.
Similarly, "It's not the events of our life that make us unhappy, it's the way we think about them," Gawdat says.
Finding happiness, then, requires changing your perceptions, according to Gawdat.
"See the reality of your life for what it really is. If you are reading a CNBC article online while you sit somewhere in America, your life is likely better than 99 percent of everyone who has ever lived. While all of us have to struggle every now and then, at the end of the day, our lives are still much better than those trying to survive the war in Syria or hunger in Africa," says Gawdat. "The way we think about the events of our life and compare them to realistic expectations is what makes us happy or unhappy."
Gawdat uses a thought process flow chart to achieve happiness. When he has a thought that makes him unhappy, he asks himself if it is true.
"If it isn't I drop it. Why should I let my brain make me unhappy for something that is not even true," says Gawdat. "If it is true, then I ask myself if I can do something about it. If I can, I do it. Life becomes better and I become happier.
"But if I can't ... I accept it. What's the point is stressing about something when all the stress in the world would not change it. Then once I learn to accept it as the new baseline of my life, I start to commit and do something to make things better."
That process was put to the test for Gawdat. Gawat has a daughter, Aya, now 24, and a son, Ali. In 2014, at age 21, Ali died unexpectedly during a routine appendectomy.
Gawdat had the ultimate challenge to his theory: He had to find a way to find happiness after his son's death. And he did.
"We need to start by understanding that true happiness is not reflected in the modern world's view of it being fun, elation or laughter. Happiness is finding peace and being OK with life exactly as it is," says Gawdat.
"It all starts with ... a realization that all the unhappiness in the world would not bring Ali back and so [it's] making a choice to be peaceful with what you can't change."
That requires acknowledgment of the truth, says Gawdat. "We all die. Many parents lose their children. This is just the truth. I will die too. Sooner or later I will be where Ali is. The truth is sometimes harsh, but rejecting it does not change it," Gawdat says.
"I cry every other day when I remember Ali. But here is another truth: The truth is, if I cry for the rest of my life, it will not bring him back," Gawdat says. "How wise is that?"
Prior to his death, Ali had advised his father to begin to do a different kind of work. "He said, 'I know you want to make the world a better place,'" recalls Gawdat. "I want you to start doing things that depend on your heart not your brain," Ali told Gawdat.
So 17 days after Ali died, Gawdat put his theory of happiness on paper. The writing was the foundation of "Solve for Happy." The book explains what Gawdat calls his happiness model, instructing readers how to bust their illusions, fix their blind spots and understand certain truths (all of which Gawdat enumerates) to find a state of happiness and peace.
Now, Gawdat also works to spread the message of happiness in homage to his deceased son. He launched One Billion Happy, a non-profit initiative, in September 2017. Its goal, as the name suggests, is to make people 1 billion people happy.
"The initiative is strongly anchored in asking the community to champion the movement by asking people to first prioritize their happiness, second, invest in learning and practicing what would make them happier and third, pay it forward; tell [two] people, who tell two people, who tell two people," Gawdat explains.
"Our commitment was, and still is, to honor Ali by sharing his model of happiness and peace with the whole world. Millions have received a message of happiness as a result of his departure. And that makes our world today a little better than the day he left," says Gawdat.
It gives some sort of meaning to Ali's death, says Gawdat, and that helps.
And though he admits it sounds remarkable, Gawdat and his family now maintain "a steady state of peace — even happiness," he writes in his book. "We have sad days, but we don't suffer. Our hearts are content, even joyful. Simply put, our happiness model came through for us."
Like this story? Subscribe to CNBC Make It on YouTube!