Eight of the pills were undigested in the celebrity DJ's body, and another was in his mouth, according to the source.
See other celebrities who have died this year
DJ AM, whose real name is Adam Goldstein, blocked the door to his bedroom with a mirror, which shattered when police entered the room, the source said. Police also discovered a crack pipe and crack was found under the body when it was moved, according to the source.
Also in the apartment was a Valentine's Day card from Hayley Wood. Though some reports indicated that Goldstein and Wood had recently split, Wood told Us that they were still together at the time of his death.
"Any indication that this horribly tragic accident happened because of a rumored breakup is not only untrue but disgusting," she told the magazine. "We were very much together at the time of his passing, and I love him very much."
Goldstein had recently relapsed and promised to enter rehab the day before he died, according to the New York Post. In his last days, Goldstein would only see his sponsor, whom he lit up a crack pipe and swallowed pills in front of, according to the paper.
See photos of DJ AM
"As soon as his friends, representation and his AA sponsor learned that he relapsed, which was only a couple days before he passed away, they sprung into action to try and get him to agree to go to rehab," Goldstein's rep told People.
A memorial service will be held at 7 p.m. Thursday evening at the Hollywood Palladium in Los Angeles, according to People. "The format of the evening will be in the style of an open 12-step meeting," the invitation reads. "Adam's friends both from his life in recovery, as well as those from other areas of his life are welcome. We ask only that everyone adhere to the tradition of anonymity and let what they hear there, and who they see there, stay there."