"Family always comes first," the source added. "Ben has struggled with alcohol for years and it's a struggle that millions of people have to battle every day. He has nothing to hide and wants his kids to know that he did everything he could to be a better father. That's why he announced it himself."
Affleck took to Facebook on Tuesday to share the news, writing, "I want to live life to the fullest and be the best father I can be. I want my kids to know there is no shame in getting help when you need it, and to be a source of strength for anyone out there who needs help but is afraid to take the first step."
According to the source, Affleck was clean and sober when he attended this year's Academy Awards in February, and brought along a male sober companion to the star studded ceremony.
The source adds that the Live By Night star is no longer working with the female sober coach that he was photographed with back in January.
As for the Oscar winner's relationship with his estranged wife, Jennifer Garner, the source says that "nothing has changed" between them, adding, "their relationship is still the same as it has been since announcing their separation."
However, Affleck did thank Garner for her support during his rehab treatment in his emotional Facebook post. The actor -- who shares three children with Garner, 11-year-old Violet, 8-year-old Seraphina and 5-year-old Samuel -- wrote, " I'm lucky to have the love of my family and friends, including my co-parent, Jen, who has supported me and cared for our kids as I've done the work I set out to do. This was the first of many steps being taken towards a positive recovery."