Affleck previously went to rehab in 2001.

"I went to rehab for being 29 and partying too much and not having a lot of boundaries and to clear my head and try to get some idea of who I wanted to be," Affleck said in a 2012 Hollywood Reporter cover story. "It was more a 'let me get myself straight,' before it became a rite of passage."

Affleck and wife Jennifer Garner, with whom he has three children, announced in 2015 that they were separating, but no divorce has been finalized. Affleck recently starred in and directed the Warner Bros. gangster film Live by Night, which was not well-received by critics and performed poorly at the box office. In January, he announced he would no longer be directing The Batman, in which he is set to reprise his role as the DC superhero.

"Performing this role demands focus, passion and the very best performance I can give. It has become clear that I cannot do both jobs to the level they require," Affleck said in a statement at the time. "Together with the studio, I have decided to find a partner in a director who will collaborate with me on this massive film. I am still in this, and we are making it, but we are currently looking for a director. I remain extremely committed to this project, and look forward to bringing this to life for fans around the world."

Matt Reeves has since stepped in to helm the Warner Bros. film. Affleck will appear as Bruce Wayne/Batman in November's Justice League, which has wrapped filming. No release date has been set for The Batman, which is also set to star Joe Manganiello as the villain Deathstroke.

Below is Affleck's statement: