GLASGOW, Ky. — One crisp Monday morning in January, Dr. Melissa Dennison sat in a small, windowless exam room with a 14-year-old girl and her mother. Omicron was ripping through Kentucky, and the girl was among three dozen young patients — two of them positive for the coronavirus — that the pediatrician would see that day.But this girl was part of a different epidemic, one that has gripped the community and nation since long before Covid: She and her mother had come to discuss the girl’s declining mental health.The girl had dark hair and wore jeans and a T-shirt bearing the words “Purple Rain.” She was depressed, she told Dr. Dennison, and had been cutting her arm to relieve her emotional pain. Dr. Dennison suggested therapy, but the girl said she would not go.After the exam, Dr. Dennison stood in the hallway and described the case. “You need to get off the phone and the computer,” she had told the girl. “When it’s pretty outside like this, put on a bunch of clothes and go for a walk.”Dr. Dennison prescribed the antidepressant Zoloft, although she wasn’t sure the girl was clinically depressed.“I’d rather they see a psychiatrist,” she said. “But if I’ve got this child and they’re cutting and saying they’re going to kill themselves, I’ll say, ‘Well, I’ll see them today.’ If I call a child psychiatrist, they say, ‘I’ll see them in a month.’”Over the last three decades, the major health risks facing U.S. adolescents have shifted drastically: Teen pregnancy and alcohol, cigarette and drug use have fallen while anxiety, depression, suicide and self-harm have soared. In 2019, the American Academy of Pediatrics issued a report noting that “mental health disorders have surpassed physical conditions” as the most common issues causing “impairment and limitation” among adolescents. In December, the U.S. Surgeon General, in a rare public advisory, warned of a “devastating” mental health crisis among American teens.But the medical system has failed to keep up, and the transformation has increasingly put emergency rooms and pediatricians at the forefront of mental health care. Community doctors now routinely deal with complex psychiatric issues, making tough diagnoses after brief visits and prescribing powerful psychiatric medications for lack of better alternatives. “Pediatricians need to take on a larger role in addressing mental health problems,” the 2019 A.A.P. report concluded. “Yet, the majority of pediatricians do not feel prepared to do so.”Dr. Cori M. Green, a co-author of that report and a pediatrician at Weill Cornell Medicine, said medical training lagged behind. “We need to overhaul the whole system,” she said. “We need to see mental health through a prevention lens and stop seeing physical health as different than mental health.”Dr. Dennison in an examination room, wheeling a laptop from patient to patient. Twenty years ago, 1 percent of her cases related to mental and behavioral health, she estimates; now at least 50 percent do.In Glasgow, Ky., as elsewhere, there are counselors in the schools and therapists in town, including four at Dr. Dennison’s clinic. But they are often booked months out. Psychiatrists are scarce, here and nationwide. Seventy percent of counties in the United States lack a psychiatrist specializing in children or adolescents — and the psychiatrists who can be found are concentrated in wealthier areas, with many accepting only private payments.“There’s a need and nowhere else to go,” Dr. David Lohr, a child and adolescent psychiatrist at the University of Louisville, said of the growing role of primary-care doctors in mental health.Dr. Dennison, 62, has adapted. Two decades ago, she routinely prescribed antibiotics and saw patients with “strep throat, earaches and wheezing,” she said. “And no one heard of A.D.H.D.,” she said, referring to attention deficit hyperactivity disorder. She estimated that, back then, 1 percent of her cases related to mental and behavioral health; now at least 50 percent do.The causes of this crisis are not fully understood. Experts point to many possible factors. Lifestyle changes have led to declines in sleep, physical activity and other healthful activities among adolescents. This generation professes to feeling particularly lonely, a major factor in depression and suicide. Social media is often blamed for these changes, but there is a shortage of data establishing it firmly as a cause.In Glasgow, a town of 14,000, the challenges are intensified by high rates of drug addiction and poverty and their effect on families.