Patrick Dempsey recalls the "scary" moment when he thought his 15-year marriage was over.
The former Grey's Anatomy star's wife Jillian filed for divorce in January 2015, but now appears to have settled their differences. Earlier this year, Dempsey confirmed to ES Magazine that he was in the midst of mending his marriage, and in a recent interview, he reveals how he came to restore his relationship with the mother of his three children.
WATCH: Kourtney Kardashian 'Can't Wrap' Her Head Around Getting Back Together With Scott Disick -- 'It Would Be So Much Work'
"It's always destabilizing when you're potentially breaking up a family or you have a big section of your life that's ending," he tells People magazine. "Everybody has their own path. Jill and I decided it was time to work on our issues and improve. We wanted to be role models for our kids like, okay, if you have differences, you can work them out."
The 50-year-old actor admits that he wasn't ready to throw in the towel on his marriage. "I didn't feel like we had done all the work. And we both wanted to do that work. That's where it started," he says. "I [learned] to prioritize. Our union has to be the priority. I wasn't prepared to give up on her and she wasn't either. We both wanted to fight for it."
EXCLUSIVE: Jennifer Garner and Ben Affleck Are 'Making It Work' One Year After Separation, But Still Not Divorced
Now, Dempsey says he and his wife are focused on making their marriage work, calling this time around a "new beginning."
"You've got to keep at it," he shares. "You've got to communicate, and stay open and not get lazy. And not give up."
PHOTOS: Patrick Dempsey Gets Cozy With Wife Jillian at Charity Event in Santa Monica
Dempsey adds, "And lots of sex!"
The actor has been busy promoting his new movie, Bridget Jones's Baby, which hits theaters September 16, and walked the red carpet with his wife and kids, 14-year-old daughter, Tallula, and 9-year-old twin boys, Darby and Sullivan, at Monday's premiere in London, England.
WATCH: Patrick Dempsey Confirms He's Back With Wife Jillian -- 'You Have to Work at Everything'