See Patrick Dempsey's Malibu Home

Patrick Dempsey is not one to give up on those he loves.

The 50-year-old is opening up about his fight to save his marriage with his wife, Jillian, who filed for divorce from the former "Grey's Anatomy" star back in January 2015—after a whopping 15 years of marriage.

For Dempsey, it was the wake-up call he needed to reprioritize things in his life.

"Our marriage was not something I was prepared to let go of," he said in an interview with PEOPLE magazine. "I didn't feel like we had done all the work. And we both wanted to do that work. That's where it started."

For Dempsey's part, that meant giving up his hobby of race car driving, as well as leaving "Gray's Anatomy" in April 2015 to focus more time on his family.

"You can only do one thing at a time and do it well," he explained. "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."

It also meant that the couple enrolled in counseling, which Dempsey deemed "very important."

On top of saving his relationship, the actor admits he didn't want to disrupt his children's lives. Dempsey and Jillian are parents to daughter Tallula, as well as twin sons Darby and Sullivan.

"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 said.

It appears the hard work has paid off, since the family was all smiles at the London premiere of Dempsey's new film "Bridget Jones's Baby" on Monday.

"You've got to keep at it," Dempsey said of his ongoing commitment to keep his marriage intact. "You've got to communicate, and stay open and not get lazy. And not give up. And lots of sex!"