(CNN)Growing up as an evangelical, Pete Holmes thought he was doing everything right. He believed in the Bible -- all of it -- and said he didn't smoke, drink or have sex before marriage.

He went on mission trips to Africa, played bass on the worship team, even wore pleated khakis.

Then one day, as Holmes was struggling to kick-start his comedy career, his wife left him for another man.

His world, and his belief in God, exploded.

"I felt like the Lord hadn't held up His end of the bargain," Holmes writes in his new memoir, "Comedy, Sex, God" -- "and I was pissed."

But Holmes' spiritual search didn't end there.

After diving into atheism (he called himself a "hooraytheist") Holmes found new spiritual life by taking "magic mushrooms," aka psychedelic psilocybin, and studying myths and mysticism.