The 39-year-old actor - who has attracted attention with his partying since announcing in October he had separated from wife Courteney Cox Arquette - decided to enter the facility in California on Saturday after a wild New Year`s Eve (31.12.10).
A friend said: "He was drinking too much. Once he drank too much, he became somebody he didn`t like."
Another friend added the star is struggling to cope since his marriage broke down and revealed no one is surprised at his decision to seek help.
The pal said: "He is in there for drinking and depression, not hard drugs. Rehab was inevitable. He is dealing with a broken heart. He can`t handle all the changes in his life. All his inner demons came out."
Former `Friends` star Courteney - who has a six-year-old daughter, Coco, with David - praised his decision to seek help for his problems.
She is quoted by People magazine as saying: "I really admire David and his choice to take charge and better his life. I love and support him."
David recently admitted he was finding the split traumatic and had turned to alcohol to cope.
He said: "I`ve been drinking a lot. But I don`t want to go into all that, because it`s really a personal, traumatic thing.
"Everybody`s worried and concerned about me. When I drink, I become a maniac.
"This is the hardest thing anyone has to go through. You wake up and the reality hits you."