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.