Shia LaBeouf is back from the brink of a terribly dark place, and he's crediting his latest project, "Padre Pio" ... saying the role and God pulled him back to the light.
Shia revealed he did some serious studies on Catholicism for his upcoming film ... talking about his journey to meet with Bishop Robert Barron of the Word on Fire Catholic Ministries.
He says he even prepped for the role of the Franciscan Capuchin friar by living in a monastery with other friars.
Shia admits he went into production at a rough point in his life -- as we reported, he was sued by his ex, FKA Twigs, in 2020 for sexual battery, and claims he felt suicidal. He says he told the Bishop, "I had a gun on the table. I was outta here. I didn't want to be alive anymore when all this happened."
However, he thinks his studies made him a lot more grateful to be alive, saying ... "It was seeing other people who have sinned beyond anything I could ever conceptualize also being found in Christ that made me feel like, 'Oh, that gives me hope.'"