Singer Danny Gokey stood on the cusp of his biggest career break when his wife died from a heart-related condition.

He could have turned down the audition for American Idol, the one the couple had talked about for months. Who would blame him?

Instead, he remembered how much she had wanted him to give it all he had on the hit reality show. That act started a series of events that would take him from his blackest hour to a place where he could give back to those in need.

Gokey wrote Hope in Front of Me to share his transition from personal agony to helping others in Sophia’s memory.

The new book, subtitled, Find Purpose in Your Darkest Moments, details the dawn of Sophia’s Heart, a 77,000 square foot facility in Nashville that houses and helps the less fortunate. The foundation expects to take more than 50 homeless families off the streets this year.

Gokey didn’t set out to create a foundation in his late wife’s honor. A twist of insurance fate left him with money he simply couldn’t use for selfish pursuits. The couple had recently switched over to her insurance to save a few dollars each month, and the death stipend included in her policy left him with $39,000.

“It was more money than I ever had. I knew the money wasn’t mine. It cannot be mine,” he says. So he used the cash to start a charitable effort she would applaud.

“We always loved to help people. We served at the church and helped the hungry,” he says. “The foundation was just another twist in life I didn’t see coming.”

American Idol helped establish his singing career, but making it through the competition wouldn’t have been possible without his faith. It’s a spiritual journey he chronicles in the book.

“I was really angry with God, but God was the only one who could help,” he says. “[Now] I feel like I know God more intimately than ever before.”

He wants others to find hope from his story, and even though most of the book’s readers won’t have suffered the loss of a youthful spouse their pain is a common bond.

“Just keeping pushing forward, don’t fall into the trap of the negative emotions,” he advises.

He is heartened by the story of a woman who watched him compete on American Idol’s eighth season. Her boyfriend had taken his own life and she wanted to do the same. She heard Gokey open up about his own tragedy and she decided to give life a second chance, he recalls.

“There’s purpose in our pain,” he says.

Losing his wife also changed the way he connects with a live audience. He shares stories associated with Sophia’s Heart during his concerts now, letting the inspirational stories wash over the crowd.

Today, Gokey is prepping for the release of a new album early next year, and he has since remarried and had a child. Sophia’s Heart keeps him busy, too, but he hopes his book and personal story can have a positive impact on others going through their own heartbreak.

“I tell people life is like a book being written by heavenly hands that we can’t see,” he says.