Elan Kels was at wit’s end. Despite several attempts at dieting, the 36-year-old real estate broker had ballooned to 285 pounds in the fall.

“I tried a million diets and failed a million diets. The diets that used to work for me don’t work for me anymore,” Kels tells The Post.

He had some short-term success following a restrictive low-carb regimen, but he quickly gained back the 50 pounds he lost.

He then attempted intermittent fasting — a popular diet that involves severely restricting calories a couple days a week.

‘It can be so bad for your organs. That’s why people with anorexia can die of a heart attack. Their body feeds on their heart.’

Followers of intermittent fasting generally report losing about a pound of weight a week, but Kels was impatient. He scoured the internet — from Reddit forums to news reports — looking for a quicker way to lose weight. That’s when he stumbled upon water fasting — a controversial and potentially dangerous cleanse that restricts consumption of anything besides water, coffee and tea.

“The idea is: You could do it as long as you have fat on your body, and that’s what gives you energy,” he says.

In October, Kels set out to drink only water for 47 days. By Day 5, he felt uncommonly energetic and focused. By Day 28, though, he was so tired he could barely get out of bed. He called it quits.

With intermittent fasting now in the mainstream — and a slew of books riding the coattails of the 2013 best seller “The Fast Diet” — experts worry that cleanse obsessives are taking fasting too far. Not ready to commit to long-term lifestyle changes, these desperate dieters are hopping on extreme fasting programs designed for the obese to lose weight rapidly. And they’re spreading the radical gospel on social media — documenting the play-by-play of these potentially lethal cleanses with YouTube diary videos and on Twitter with the hashtag “#waterfast” (and pleas to “pray for me”).

Manhattan eating disorder specialist and clinical social worker Joanne Labiner, who’s been in practice for 37 years, considers the extended water fast to be a form of disordered eating.

“It can be so bad for your organs. That’s why people with anorexia can die of a heart attack. Their body feeds on their heart,” says Labiner. “Your body thinks it’s an emergency and tries to prevent that fat storage from being used up, and it feeds on the muscle.”

Even doctors who advocate fasting are cautioning against the trend.

Dr. Jason Fung, a kidney specialist who wrote the book “The Complete Guide to Fasting,” advocates for short-term fasting for certain patients and prescribes longer water fasts for clients who are extremely obese and suffer from Type 2 diabetes.

“It’s very useful in the treatment of Type 2 diabetes, where the accompanying weight loss may significantly reverse the underlying disease,” says Fung. The medical research appears to back him up: A new study published in the Lancet in early December found that severe calorie restriction reversed Type 2 diabetes in many obese patients.

“Water fasting is getting popular in many places. It can be done, people do them, but they have to be done safely,” says Fung.

He oversees some clients doing longer fasts. “If you’re 300 pounds, you’re not taking a huge risk by fasting for 28 days; if you’re obese … you have more fuel sources,” he says. “I don’t think it’s the safest thing to do, but if you’re obese, it’s not the most dangerous thing, either. If you’re relatively slender, it’s more dangerous.”

No matter your size, “The longer you [fast], the more risks you take,” Fung says. “One is refeeding syndrome, seen in people who are slender already,” as well as malnourished prisoners of war.

With refeeding syndrome, once patients reintroduce food back into their diets after long periods without eating, “the phosphorous in their blood can go into their cells, leaving them weak,” says Fung. The shift in electrolytes can cause cardiac failure and even death.

‘A lot of the loss is water weight — temporary — and the other loss can be muscle, which isn’t good.’

Even the amount of water that patients drink per day should be closely monitored.

More than a gallon of water a day “could be dangerous,” according to hydration expert Dr. Stanley Goldfarb, a professor of medicine at the University of Pennsylvania. “The problem with these diets is the thinking, ‘If a little is good, a lot of it is better.’ If you went on a diet where you just drank water and didn’t take in anything [else], you could have a real problem excreting all the water you’re ingesting.”

In 2007, 28-year-old Jennifer Strange died from water intoxication after participating in a radio contest that had entrants pounding H2O to win a video-game console.

“The body has a great capacity to excrete water you drink, but it’s not an unlimited one,” says Goldfarb.

Besides, the results can be more — or, rather, less — than what adherents bargained for.

“A lot of the loss is water weight — temporary — and the other loss can be muscle, which isn’t good. So you’re not really losing the fat, which is what you want when you’re losing weight,” Labiner says.

Kels ultimately lost 55 pounds from his fast, but has already regained nearly half of it, a result Fung regularly sees.

“Losing 55 pounds, you can expect to regain quite a bit of that,” Fung says, adding that beleaguered believers will likely experience feelings of, “OMG, that was a huge waste of time.”