American swimmer Michael Phelps, the most decorated Olympian of all time, revealed that he suffered a crisis of identity two years ago, which led him to consider ending his life, but it was Saddleback Church Pastor Rick Warren’s book The Purpose Driven Life that gave him hope.

ESPN reported that Phelps was “struggling to figure out who he was outside the pool” in 2014, which led him to heavy drinking and wondering whether his life was worth living.

“I thought the world would just be better off without me,” Phelps admitted. “I figured that was the best thing to do — just end my life.”

The 22-time medal winner, who is also set to compete at the Summer games in Rio, said in a seperate interview with NBC’s “Today” that his DUI arrest in 2014 led to a “downward spiral” that left him feeling the lowest he had ever been.

It was the Olympic swimmer’s second DUI arrest in 10 years, which along with his numerous splintered relationships, prompted him to seek outside help.

Phelps found hope in October 2015 when he entered The Meadows, a psychological trauma and addiction treatment center in Arizona.

There, Phelps turned to Warren’s bestseller The Purpose Driven Life, which uplifted him so much so that he was nicknamed “Preacher Mike” by fellow patients, since he would often read to them from the book.

Looking back at his troubles, Phelps told “Today:”

“I don’t know if it was, like, afraid of just letting go and showing who I am or what it was. And, and I finally was just, like, ‘You know what? Screw this. I’m not, I’m not hiding behind anything anymore. I am who I am. And, and you don’t like it, it’s really not my issue and it’s not my problem.'”

Responding to Phelp’s comments about The Purpose Driven Life, Warren wrote in a short message on Facebook Thursday:

“I’m proud of @MichaelPhelps for his victories even before the Olympics begin. Excited he’ll be carrying the flag for the US.”

Phelps said in his “Today” interview that he is looking forward to finally giving 100 percent of himself at the Rio games, which open on Friday.

“I’m happy to turn the page to the next chapter. I’m happy to move on from my swimming career and go out how I wanted to,” he added.

The Purpose Driven Life, which was released in 2002, went on to sell over 30 million copies worldwide, and is till one of the highest Christian best-sellers, as well as one of the most translated books after the Bible.

The book was redesigned for millennials in a 10th anniversary edition in 2012 and titled What on Earth Am I Here For? The Purpose Driven Life, aimed at appealing to the younger generation.