The end of Jennifer Garner’s marriage with Ben Affleck in 2018 sent the actor down a dark path that saw him drinking uncontrollably, consequently leading his family members to intervene and send him to rehab for professional help.

Of course, Affleck’s marriage didn’t just fall apart over his addiction to alcohol: It was claimed he had allegedly been unfaithful to his then-wife, but his drinking habits only worsened when Garner separated from the Daredevil star, leaving many of his loved one concerned.

Thankfully, it was his childhood pal Matt Damon who ended up helping Affleck get through some of his toughest moments when everything appeared to be falling apart for the Oscar winner, but how exactly was he able to save his pal from digging an even deeper hole for himself?

Matt Damon Helped Ben Affleck Overcome His Addiction

Firstly, Affleck has never been shy about his alcohol addiction in the past. While the father of three claims to have sobered up since his infamous downfall two years ago, in a 2012 interview with Barbara Walters, he opened up about the history of alcoholism in his family.

"Yes, [my dad] was an alcoholic. . . . I did know that as a child,” he told Walters.

RELATED: Twitter Is Loving That Snoop Dogg Performed At Tyson Vs. Jones Jr. Fight, But They Loved His Commentary More

"He drank a lot. My father was a -- what did they call him -- a real alcoholic. He, you know, drank all day, drank every day, and to his credit, he got sober, ultimately, and he's been sober for several decades, which I think is pretty impressive.”

Then, in January 2017, the Gone Girl actor shared some insight into his close friendship with Damon, who he has known since his teen years, stressing that their bond has helped him overcome many tough times — and he was ultimately grateful to have him in his life.

While Affleck didn’t go into detail on what exactly Damon had been a tremendous help with, considering it was already public knowledge of the 48-year-old’s drinking habits, it seemed rather apparent it was to do with his substance abuse.

"I can't tell you how valuable it is to have somebody who's been through things with you, ups and downs, who knows what your life experience is like, who can identify with that," he shared.

"It's an incredibly valuable friendship and it's very precious and so is my friendship with my brother. I don't know what I would do without those guys.”

RELATED: ‘You’ Star Jenna Ortega Opens Up About Scream 2022: ‘I Am Still In Disbelief’

A source for Entertainment Tonight in September 2018 explained that while Affleck and Damon loved to party together in their younger years, once the latter realized that his pal had been struggling with an alcohol problem, he refrained from enabling him to partake in anything that could trigger his addiction.

That same year, the pair came to an agreement that they were both going to stop drinking altogether because even though Damon didn’t have an alcohol problem, per se, he figured that since he’s already spending so much time with his pal, the wisest thing to do is to show him that living a sober lifestyle isn’t impossible by any means.

"Matt stopped drinking with Ben because in no way does he want to support another downward spiral. Matt is a very loyal, stable and grounded friend who only wants success and happiness for Ben,” the source continued.

According to the publication, Affleck’s family deemed Damon as a good influence on the troubled Hollywood star, who entered rehab on multiple occasions in 2018 as Garner proceeded with her divorce from the man she once thought she’d spend the rest of her life with.

Affleck, who was once engaged to pop superstar Jennifer Lopez, entered rehab for the first time in 2002, and while things stabilized themselves again after meeting Garner, his crumbling marriage with the actress by 2015 had led the actor to spiral out of control as far as his alcohol intake was concerned.

RELATED: Jennifer Garner Reveals How Matthew McConaughey Helped Her Stay In ‘Dallas Buyer’s Club’

"I drank relatively normally for a long time," he told Entertainment Tonight. "What happened was that I started drinking more and more when my marriage was falling apart. This was 2015, 2016. My drinking, of course, created more marital problems.”

Thankfully, the Argo film director is doing better these days, and his relationship with Garner — through they’ll never get back together — is much healthier than it has been in quite a while.

Furthermore, considering the pair share three children, Violet, Samuel, and Seraphina, it was important for them to find an understanding to effectively co-parent their kids as a family.

It’s good to have friends like Damon, that’s for sure.

NEXT: Freddie Prinze Jr’s Net Worth: How 10 Of The Biggest 90s Stars Are Doing Today