Ben Affleck is opening up about his long-standing battle with alcoholism, and the way it has impacted his family.

In 2018, he went through rehab for the third time, after his ex-wife Jennifer Garner staged an intervention. He relapsed again in October, with TMZ publishing shots of him looking drunk outside a Halloween party. He has since worked to get sober again, the 47-year-old tells ABC News’ Diane Sawyer, in an interview released Thursday.

He said that he doesn’t want his kids to pay for his issues, after watching his aunt, grandmother and father's struggle with alcohol.

Affleck said: "For me seeing my dad was just, he was drunk every day and that was just life. And then as that got worse, that was really, really painful. And I always said, 'That'll never be me. I'm never gonna do that.'"

He added: "I really don't want my children to pay for my sins. Or to be afraid for me, which is one of that hard parts of being the child of an alcoholic. You think, 'What if my dad gets drunk? What if he does something stupid? What if he ends up on TMZ, and it's on my newsfeed and other kids see it?'"

Affleck also opened up about his horror over his split from Garner, and the effect it would have on their three children, Violet, 14, Seraphina, 11, and Samuel, 7. 

Affleck said: ["I never thought that I was gonna get divorced. 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. And it upset me because it meant I wasn't who I thought I was. And that was so painful and so disappointing in myself."] SOUNDCUE (:26 OC: . . .in myself.)

Divorce and alcoholism, he said are “very painful. They just are. If there's something that your child is suffering, that's a level of pain that is not easily gotten past, not easily forgiven, not easily forgotten. And it's hard. You're not going to avoid causing your kids pain, all pain. Pain is part of life. I take some comfort in that."

Affleck’s latest movie, The Way Back, sees him playing a former basketball star who battled addiction and wants a career comeback. The film is set to drop March 6.

Ben Affleck on His Divorce :