“American Idol” Season 8 alum Danny Gokey recently opened up about his stint on the reality TV show and how it helped him cope with the death of his wife, Sophia.

While speaking with People, the 36-year-old musician said that “American Idol” paved the way for him to continue singing Christian songs while also performing songs that have universal meaning to listeners. “It didn’t matter what religion you were, it didn’t matter what ethnicity you were, what gender, what sexual orientation – everyone just tuned in and was entertained by the show,” he said.

Gokey, whose wife passed away in 2008, admitted that he wasn’t supposed to audition on “American Idol.” After all, it was only a month since he said goodbye to Sophia, who passed away after a routine surgery for congenital heart disease. But since the singer knew that it was already his last chance to be on “American Idol” due to the age limit, he decided to give it a try.

“I’ll tell you this: I wanted to take my own life. I hated the pain I was in… Even though I didn’t want to go, I’m glad I did because it expanded my view of the world. The show actually helped bring me healing,” he shared.

The singer is now married to Leyicet Peralta, and they have been blessed with two children, Daniel, 4, and Victoria, 2. Later this year, they will also welcome their third child together. “This is a chapter of my life I didn’t know I was going to walk into. It’s one of those things that is unbelievable. I didn’t know that these chapters existed,” he said.

“American Idol” aired its 15th and final season on FOX in April 2016. Trent Harmon became the reality singing competition's last winner.