Fred Morgan's son, Cody Morgan, 23, and his grandson, Tucker Bailey, 4, at the family's dairy farm in Eaton, N.Y. Fred Morgan said he had considered committing suicide so that his family could receive a life insurance payout after he was unable to repay debts.

EATON, N.Y. — Fred Morgan was already deep in debt from rebuilding his milking barn after a fire when milk prices plunged in 2015, setting off an economic drought that is now entering its fourth year — the worst in recent memory for dairy farmers in New York State.

Mr. Morgan, 50, saw no way to save the dairy farm in central New York State that he took over as a teenager from his ailing father and ran with his wife, Judy, and their son, Cody.

With the farm operating at a loss and facing foreclosure, Mr. Morgan believed his only solution was his $150,000 life insurance policy. He said he planned on killing himself so his family could receive the payout.

“I’d sacrifice my life so my family could keep the farm,” Mr. Morgan said. His wife persuaded him otherwise.

Mr. Morgan was hardly alone in his suicide plan. There has been a spate of suicides in the state as the dairy industry has nose-dived, resulting in the closing of hundreds of small farms. While the dairy industry nationwide is in the grips of an economic crisis — fueled by decreasing demand as customers turn to milk alternatives — the picture is particularly bleak in New York where dairy sales represent about half of total farm sales every year.

New York is the third largest milk-producing state in the country and low milk prices have not only devastated farmers financially — most are selling milk for less than it costs to produce — but also emotionally.

The situation has become so grim that NY FarmNet, a leading farm support group, has started running suicide prevention training for local agricultural service providers and lenders who deal with dairy farmers.

After a local dairy farmer took his life in January, Agri-Mark, a large cooperative that bought milk from the farmer, sent its 550 members in the state a list of suicide and mental health hotlines — along with the news that milk prices would drop even lower this year.

In providing the information, the co-op wanted “to get ahead of the curve” in offering vital services to its member farmers, said Doug DiMento, a spokesman for Agri-Mark, which owns Cabot and McCadam cheese.

It was one of at least three suicides of its member farmers in recent years, Mr. DiMento said.

Hal McCabe, the outreach director for FarmNet, believes the number of suicides is higher on the roughly 4,500 dairy farms across the state during this downturn, but the issue is hard to quantify, he said, because many have been reported as farming or hunting accidents.

There have been 81 work-related deaths on dairy farms reported from 2006 to 2016, with most of the victims the owners of smaller farms, according the state Department of Health.

Whatever the prevalence of suicides, there is no doubt about the widespread hopelessness afflicting the industry.

FarmNet’s 24-hour hotline has been fielding an increased rate of calls from distressed farmers, Mr. McCabe said, and the agency has begun offering stress management training for its team of financial and other consultants who assist farmers.

“It’s not unusual to get woken up in the middle of the night by a farmer who is potentially suicidal,” Mr. McCabe said.

Farming overall is a stressful occupation and farmers have higher suicide rates than almost any other occupation. Those working in farming, fishing, and forestry were 3.4 times more likely than other American workers to commit suicide on the job, according to a 2016 study by the federal Centers for Disease Control and Prevention.

In Mr. Morgan’s case, his wife was able to dissuade from taking such a tragic step and instead seek out the counsel of two FarmNet consultants — Judy Flint, a social worker, and Dewey Hakes, a financial consultant and former dairy farmer.

The Morgans, unable to repay six bank loans and debts to neighbors and suppliers, declared bankruptcy, restructured their finances to help pay off debts and have been seeing increased revenue after switching to producing organic milk, which they can sell at $43 per 100 pounds, or hundredweight.

That is about three times the going price for conventional milk, whose prices have dropped below $15 per hundredweight, down from peaks of over $25 in 2014.

Milk prices are calculated under federal guidelines and have been driven down by a combination of strong milk production and weak demand in both global and U.S. markets with many Americans turning to alternatives such as soy and almond drinks, said Dr. Andrew Novaković, who teaches agricultural economics at Cornell University.

In New York State, many smaller farms, facing financial hardships or run by aging owners, are closing at a rate of over 100 per year. Many of them become part of much larger operations.

So though about 550 dairy farms closed in the state from 2012 to 2017, the number of dairy cows has actually increased from 610,000 to 625,000 in that same period and milk production has risen steadily in recent years, according to the state’s Department of Agriculture and Markets, which helps fund FarmNet.

With prices depressed, farmers looking to sell are having a hard time finding buyers.

“A lot of dairy farmers are thinking about closing, but with the prices down, nobody else has the money to buy their equipment and cattle, so you’re between a rock and hard place,” said Bill Kiernan, 75, a dairy farmer in Copake, N.Y., who runs Walt’s Dairy, which has 400 Holstein cows on 768 acres.

Mr. Kiernan’s two sons have helped the farm survive by taking construction jobs. When he received the suicide outreach information from Agri Mark, Mr. Kiernan said he “threw it in the garbage.”

“Everyone was kind of upset about it — you’d think there would be more optimism,” said Mr. Kiernan, who has seen the dark side of dairy farming.

In 2010, his neighbor, Dean Pierson, 59, a dairy farmer, shot all 51 of his milking cows and then turned the weapon on himself, leaving suicide notes on cow tag cards stating that he was “overwhelmed” by personal and financial issues.

Mr. Pierson, whose body was discovered by an Agri-Mark driver, had grown increasingly isolated and “had a lot of things to sort out,” said Mr. Kiernan, who buried his neighbor’s cows and now rents Mr. Pierson’s farmland.

Mr. Pierson’s isolation is common to dairy farmers, said Paul Fouts, 45, whose farm in Cortland, N.Y., is also struggling.

“You go into that barn and you’re in your own little world,” said Mr. Fouts, who wakes up at 2 a.m. every day to milk 410 Holsteins. “There may be days on end you don’t go into town. It’s easy to get consumed in your own problems.”

Mr. Fouts said he would like to see his farm, which his grandfather started in 1937, taken over someday by his two teenage children. But he has exhausted his credit with his lender.

“This is my gamble,” he said, pointing out recent improvements to his 750-foot long barn to try to increase his cows’ productivity by making them more comfortable. Still, if his financial trajectory persists, he could operate at a $300,000 loss this year and be forced to fold.

“I’m not at the end of my rope, but the rope’s getting short,” he said.

Like Mr. Fouts, many dairy farmers run farms that have been in their family for generations and the shame of failing financially can be emotionally overwhelming, said Kate Downes, the program coordinator at NY FarmNet, which is based in Ithaca.

But admitting they need help is not always easy. Many farmers would never want their vehicles to be spotted outside mental health offices, said Ms. Downes, whose uncle took his life several years ago at his third-generation dairy farm in Jefferson County.

Farmers tend to work long hours with few breaks from the farm — or each other, if they are a family-run farm. And they often own guns, Mr. McCabe said.

Smaller problems can seem outsized, he said, before describing a recent call from a farmer who said he was suicidal over $27,000 worth of debt.

“You’re not just losing your job and your house,” he said. “You’re losing your entire family history and legacy, through no fault of your own.”

Any claim arising from the information contained on the eDairy News website will be submitted to the jurisdiction of the Ordinary Courts of the First Judicial District of the Province of Córdoba, Argentine Republic, with a seat in the City of Córdoba, to the exclusion of any another jurisdiction, including the Federal.