Garner and Affleck were married from 2005 to 2018 and share three kids, Violet, 14, Seraphina, 11, and Samuel, 8.
Prior to Affleck's relapse, both he and O'Connor responded well to the film's script and wanted to be involved in its making. Initially, though, O'Connor questioned whether Affleck could play Jack Cunningham, a basketball coach dealing with addiction, as the character mirrors the actor's own struggles.
"We met, and it was a several–pronged conversation, because, obviously the character is dealing with his disease and Ben was struggling with the same disease. This was gonna become art-imitating-life, life-imitating-art," O'Connor explains. "All these blurred lines, it was very delicate, so I needed to really just trust that Ben was gonna be willing to go there. Once he was willing to assure me that he was gonna be brave enough to do that, then we decided to go on the journey together."
That journey, though, was halted just as the movie was in the beginning stages of getting made.
"Just as we started prepping the movie, Ben fell off the wagon. So he ended up going to rehab, and I didn't know if the movie was over. The studio certainly thought the movie was over," O'Connor recalls. "His ex-wife, Jennifer Garner, called me up, and told me that when he went to rehab, he took a basketball with him. She said, 'Gavin, he's asking you, please don't pull the plug on the movie, he really wants to do this.'"
"So, he had about a week of detoxing, because he really went off the deep end, and after a week, I was able to go see him," he continues. "We spent half a day together and figured out a way to do this that will work for him, because most importantly he needed to recover and needed to get his sobriety on track. That overtook everything."
Affleck got out of rehab one day before shooting began, which, O'Connor says, led to "a very raw, vulnerable guy showing up for our first day of shooting."
"It's almost a counter-intuitive thing with acting, because he's doing scenes that were obviously painful -- really intense and dark and bleak and suffering," he says. "And capturing that, to watch him do that was hard at times, but it also was euphoric, because that's your job as an actor, is to access these emotions and to go to places that are honest and deep and truthful."
"So, it always felt really good, even though it was painful, because he was doing his job really well," O'Connor adds.
When ET's Rachel Smith spoke to the actor last month, Affleck revealed that he saw his personal experience with the topic as "an advantage" when making the flick, adding that he was "feeling a full range of kind of access to my emotions" and felt "ready to do a heavy, performance-based piece."
"I knew that in this day and age of celebrities' personal lives becoming news stories, those were questions I was kind of going to answer anyway," he said. "The interesting thing for me was to be able to define the story myself, the way I see it, which is really one of hope."
"I know and have a lot of friends who have dealt with issues like this compulsive behavior and addictive behavior, and the vast majority of them are really honest, accountable people living good, healthy lives," Affleck added. "The idea that life gets better, that you can get better, that you can overcome your obstacles, is a really important one to me and that's the approach I liked about this movie. It was not just like, 'Oh, there is alcoholism.' That's kind of ordinary."