Ben Affleck is working hard to keeping his family together even though he and ex-wife, Jennifer Garner, divorced in 2018.

The Oscar-winning actor/director, 47, sat down with Diane Sawyer for a tell-all interview during which he opened up about his struggles with sobriety, being a dad and his very public split from the actress.

After the interview aired on "Good Morning America," Affleck had Sawyer read a public letter from Affleck to Garner. “What I want to say publicly and privately is, ‘Thank you. Thank you for being thoughtful, considerate, responsible, and a great mom and person,’ ” Sawyer, 74, read.

BEN AFFLECK BATTLES ALCOHOLISM IN NEW FILM, 'THE WAY BACK'

During the emotional interview, Affleck admitted he never wanted his marriage to end in divorce and called the experience "painful."

“I didn’t want to get divorced, I didn’t want to be a divorced person, I really didn’t want to be a split family with my children,” he said. “It upset me because it meant I wasn’t who I thought I was and that was so painful and so disappointing. In myself.”

Affleck confessed he began drinking heavily at a young age and his father also was an alcoholic. "I started to drink every day. I'd come home from work and drink until I passed out on the couch," he said.

The "Argo" star had entered into rehab multiple times, including his most recent stint in 2018 and feels at this point in his life, "I don't have any more room for failure of that kind."

BEN AFFLECK CALLS JENNIFER GARNER DIVORCE 'BIGGEST REGRET OF MY LIFE'

"I have to be the man I want to be at this point," he said mentioning his children. Garner and Affleck have three children together: Violet, 14, Seraphina, 11 and Samuel, 7.

"I really don't want my children to pay for my sins or to be afraid for me which is one of the hard parts of being the child of an alcoholic," Affleck reflected.

Jennifer Garner with Ben Affleck

Jennifer Garner with Ben Affleck (Getty Images)

"If your child is suffering something that's a level of pain that is just not easily gotten past, not easily forgotten, not easily forgiven. It's hard. You're not going to avoid causing your kids pain -- all pain -- pain is part of life," he continued. "I take some comfort in that I'm doing my very, very best and I hope that that is, you know, has to be good enough."

Affleck previously spoke to the New York Times while doing press for his upcoming movie "The Way Back" in which he plays an alcoholic trying to put his life back together again.

BEN AFFLECK THANKS FANS FOR SUPPORT AFTER COMPLETING ALCOHOL REHAB

"People with compulsive behavior, and I am one, have this kind of basic discomfort all the time that they’re trying to make go away,” Affleck told the outlet. “You’re trying to make yourself feel better with eating or drinking or sex or gambling or shopping or whatever. But that ends up making your life worse. Then you do more of it to make that discomfort go away. Then the real pain starts. It becomes a vicious cycle you can’t break."

He added: "That’s at least what happened to me.”

Actor Ben Affleck and his wife, actress Jennifer Garner arrive at the 2014 Vanity Fair Oscars Party in West Hollywood, California March 2, 2014. REUTERS/Danny Moloshok (UNITED STATES  - Tags: ENTERTAINMENT)(OSCARS-PARTIES) - RTR3FYTG

Ben Affleck and Jennifer Garner were married from 2008 - 2018.  (Reuters)

Affleck recalled that he "drank relatively normally" for most of his marriage. But in 2015 or 2016, as issues began to bubble up in the relationship, he began to drink more heavily, which "created more marital problems."

CLICK HERE TO GET THE FOX NEWS APP

“The biggest regret of my life is this divorce,” revealed Affleck. He explained that while he still feels guilt over the split, he's moved beyond the shame.

“Shame is really toxic. There is no positive byproduct of shame," he said. "It’s just stewing in a toxic, hideous feeling of low self-worth and self-loathing.”

Fox News' Nate Day contributed to this report.