CONCORD, N.H. — In the state morgue here, in the industrial maze of a hospital basement, Dr. Thomas A. Andrew was slicing through the lung of a 36-year-old woman when white foam seeped out onto the autopsy table.

Foam in the lungs is a sign of acute intoxication caused by an opioid. So is a swollen brain, which she also had. But Dr. Andrew, the chief medical examiner of New Hampshire, would not be certain of the cause of death until he could rule out other causes, like a brain aneurysm or foul play, and until after the woman’s blood tests had come back.

With the nation snared in what the government says is the worst drug epidemic in its history, routine autopsies like this one, which take more than two hours, are overtaxing medical examiners everywhere.

“It’s almost as if the Visigoths are at the gates, and the gates are starting to crumble,” Dr. Andrew said. “I’m not an alarmist by nature, but this is not overhyped. It has completely overwhelmed us.”