“It was terrifying, and rocked Bobby to the core,” a source told Radar. “It really looked like the end!”

47-year-old Brown was alone at home when he collapsed on Dec. 19, and then drove to a medical center near his Tarzana, Calif., home.

“Bobby was minutes from death! Doctors said he had just over one liter of blood left in his system,” a family source blabbed to Radar. Brown needed a blood transfusion, and spent two days in the hospital before being released.

“It’s a miracle Bobby didn’t die. He hasn’t come to terms with losing his baby girl, Bobbi, and we thought this could be the final straw!”

The former New Edition singer was a notable boozer and heroin addict, and both his famous ex-wife Whitney Houston and their late daughter endured their own substance abuse issues.

“After everything Bobby’s gone through with Whitney [Houston] and Bobbi, he’s a nervous wreck,” said the source. “But it seemed his life was slowly getting back on track, and then he almost died. Everyone is distraught!”

In related news, during a new interview with his former band-mates, Brown was asked about his forthcoming three-part miniseries “The New Edition Story.”

“I haven’t seen the whole film yet,” Brown said. “But from what I see, I’m amazed. These talented young guys did a great job at being us as young kids and then brought it all the way home. Chris [Robinson, the film’s director] brought everything out of all these actors to make it special. I was sitting in the chair over here and got a little crying on. Watching and being alive to be able to see what my life was and has become and where my life is going from this point on? It’s special, man. These kids put their hearts and souls into this, just like we put our hearts and souls into our lives.”

“The New Edition Story” will premiere as a three-night event on Jan. 24 at 9 p.m. ET/PT. The day before, the group will receive a star on the Hollywood Walk of Fame.