Jamycheal Mitchell, 24, died at the Hampton Roads Regional Jail on Aug. 19, 2015. (Courtesy of Jamycheal Mitchell’s family)

After Jamycheal Mitchell was arrested for stealing $5 worth of snacks last April, a judge ordered the mentally ill Portsmouth, Va., man to undergo treatment at a state hospital until he was well enough to face trial.

But for four months Mitchell wasted away in a cell at the Hampton Roads Regional Jail. By the time the 24-year-old died Aug. 19, he was gaunt, sickly and had shed at least 36 pounds.

A final report released Monday by a state agency details why the man who suffered from schizophrenia and bipolar disorder never got the help he needed: His case fell into a bureaucratic black hole.

The internal audit by Virginia’s Department of Behavioral Health and Development Services (DBHDS) found fundamental lapses by various state agencies handling Mitchell’s case. It also concluded that other mentally ill inmates awaiting mental-health treatment at the same state hospital also had their cases essentially lost in the system.

Mark Krudys, an attorney for Mitchell’s family, wrote in an email they were deeply troubled by the findings.

“Jamycheal died a wretched death alone in a Hampton Roads Regional Jail cell,” Krudys wrote. “The Office of the Chief Medical examiner described Jamycheal as “nearly cachetic,” a term normally used to describe gaunt patients suffering from cancer, AIDS, and certain other illnesses.”

Mitchell’s case is one of a handful locally and nationally, from the deaths of Natasha McKenna in Fairfax County to Sandra Bland in Texas, that have focused attention on the plight of the mentally troubled caught up in jail systems. Their numbers have skyrocketed in Virginia in recent years to more than 7,000.

In Mitchell’s case, the audit found the breakdowns occurred throughout the system from the courts to a state mental hospital.

Most critical, Portmsouth General District Court officials said they mailed the judge’s order to the state hospital that was supposed to care for Mitchell in late May, but the audit found no evidence that they did. Court officials did not return a call for comment.

When Eastern State Hospital in Williamsburg finally received a fax of the order two months later, an employee in the hospital’s admissions unit put the order in a drawer and failed to add Mitchell to the waiting list for a bed, according to the audit. Hospital staff did not find the order again until five days after Mitchell’s death, according to the audit. They found 10 to 12 other orders requiring inmates be restored to competency in the same drawer that had also not been added to the waiting list.

When a hospital official was asked by an auditor how that could happen, an unnamed supervisor said the employee was “overwhelmed due to the increased number of admissions and the loss of staff in the admissions department.”

DBHDS officials had said they have seen a spike in admissions at state hospitals because of a 2014 law that made it easier to commit individuals having mental-health crises. The law was passed in response to problems revealed by the attack on state Sen. R. Creigh Deeds (D-Bath) by his mentally ill son in 2013. Gus Deeds committed suicide after stabbing his father.

Even if Mitchell had been added to the waiting list at Eastern, it’s unclear when a bed would have opened up. The audit found dozens of mentally ill inmates waiting for space at the hospital, so they could be restored to competency. At the time of Mitchell’s death, 89 inmates across the state were waiting for such care.

A DBHDS spokeswoman wrote in an email that the agency and state lawmakers had moved to correct the problems identified in the audit. They hired staff to triage the waiting list at Eastern, now review the waiting list on a weekly basis and strive to admit inmates needing to be restored to competency within a week of receiving the judge’s order.

The General Assembly passed a law in March requiring stronger communication between the courts and state hospitals over the admittance of inmates that need to be restored to competency. ­DBHDS said the waiting list statewide stood at 36 as of March.

Pete Earley, a former Washington Post reporter and advocate for the mentally ill, pushed for the release of the audit. He wrote in an email he was dubious about whether Mitchell’s death would bring lasting change.

“The ineptitude and indifference in the Mitchell case is a testament to how he simply didn’t matter to those who were responsible for guarding him,” Earley wrote. “Sadly, I think this sort of preventable tragedy is more typical than an exception.”