Chris Foerster resigned from the Miami Dolphins’ coaching staff Oct. 9 after a video was released that showed him snorting cocaine off his office desk. That same day, with financial help from the Dolphins, he checked himself into an inpatient rehab facility up the coast in West Palm Beach.

It might have been the best thing that has happened to him in some time.

“I was to the point where I was just praying to God, ‘I want this stuff out,’ ” Foerster told NFL.com’s Tom Pelissero in a story published Wednesday.

“Not like exposed, but I want this out of my life. I can’t do this anymore. All this s— I had going on outside of work, I don’t want to do this anymore. I don’t want to drink anymore. I don’t want to use anymore. And sure enough, two weeks later, the video came out. So you can say it’s divine intervention. It wasn’t the way I saw everything leaving my life like that. But I knew it was coming. At 55 years old, man, I just couldn’t do this anymore.”

Foerster, 56, says he’s abused alcohol for 30 years and had been using cocaine since 2015 as a way to “keep the party going” as he got older, Pelissero writes. The video was recorded not before a team meeting, as had been reported, but before the Dolphins’ flight to London ahead of their game against the Saints on Oct. 1. Foerster told Pelissero that he had been using the drug for eight or nine straight days at that point — he claims he never was under the influence when he was actually working — and realized then that he had a problem.

Foerster has yet to patch things up with his wife and three grown children after the video was released by a woman he had met via the “men seeking women” section of backpage.com, an online classified site. After successfully completing the 60-day inpatient program at the rehab facility, he’s living alone and is drug-tested twice a week, sometimes being roused from sleep to blow into a breathalyzer. But Foerster says he’s in a good place and hopes to get back into coaching

“I’ve never felt better. I’ve never been happier,” he said. “I’ve never been more clear. I’ve never been more open to whatever the possibilities are as I am right now today.”

His former co-workers are pulling for him.

“He’s a good friend, and I think things are going well for him,” offensive coordinator Clyde Christensen said late last month. “That probably would be all I want to say, that he’s doing well. He’s working hard. He’s a good man and he’ll work on his life, just like the rest of us.”

More from The Post: