“She has two more chemo sessions to go, but she’s in a really bad place — mentally and emotionally,” a source tells PEOPLE. “She’s really losing it.”

In April, one day after undergoingemergency surgeryfor what was initially thought to be a spinal infection, the 51-year-old former Dance Momsstar — newly released from prison — was preliminarily diagnosed with non-Hodgkin’s lymphoma,a cancerthat develops in the lymphatic system.

“It was not an infection, it was a type of a non-Hodgkin’s lymphoma – it’s a type ofa cancer,” saidDr.Hooman M. Melamed, anorthopedicspine surgeon at Cedar Sinai Marina Del Rey Hospital who has been treating the star. “We’re getting an oncologist involved and we have to figure out what the next steps are as far as chemotherapy or radiation or more spine surgery. Depending on thetumortype, depending on the sensitivity of thetumor– it justdependsthe type but I feel more than yes, she will undergo chemotherapy or radiation.”

The doctor added that it is a “preliminary diagnosis pending pathology and oncology results.”

Miller went into the emergency room after she experienced “excruciating neck pain” and weakness in her arm. and after her condition deteriorated over the next couple days, Dr. Melamed performed emergency surgery for a multi-level laminectomy.

“If we didn’t do something, she was going to die,” Dr. Melamed told PEOPLE. “Her blood pressure was bottoming out. She was not doing well.”

Miller had been living in a halfway house since serving her 366-day sentence for bankruptcy fraud at the Victorville Federal Correctional Institution in California, which she entered in July.

She was transferred at the end of March to the Residential Reentry Center in Long Beach, a facility that provides a structured and supervised environment where she’ll be given employment counseling, job placement and financial management assistance.

While the Miller is scheduled to be released from custody on Friday, it is unknown if theDance Momsstar will return to a halfway house once she’s healthy.

“After the hospital she’ll be going into a rehab facility, so everything is still up in the air,” the source says. “Right now they’re just focusing on her health.”

Miller has been counting down the days until “freedom” via social media.

In May 2017, Miller received a sentence of one year and one day in federal prison, followed by two years of supervised release for bankruptcy fraud. She was additionally fined $40,000 and ordered to pay the $120,000 judgment, as well as give a DNA sample relating to her felony charge.