From Song at Sea (#903) by Rabbi Avigdor Miller
Q: What should a person do if he is overweight?
A: That’s not a question for which I am an expert, but it states “nedarim syag liprishus” a neder (vow) is a fence that helps a person abstain. It’s important stratagem. Of course you have to be yorei shamayim (fear Hashem) and know what a neder means, but it’s possible to make a neder such as, “Today I’m not going to eat any cake or any candy.”
Say that, make a neder and once you practice one day, you gain a little bit of self control. After a while you can make a neder for a week. You say, “I make a neder this week, no cake and no candy and if I’m going to eat them, each time, I’m going to send fifty dollars for the Lubavitch yeshiva. Choose some place you wouldn’t give ordinarily. Maybe Lubavitch of Satmar. That’s a way out, like a back door, an escape hatch in case you eat. And after a while a person can train himself. That’s why Hakodosh Boruch Hu gave us the power to make nedarim.
Make a neder, and once you practice one day, you gain a little bit of self-control
I once heard Rav Shimon Shkop zichrono livrocho explained what a neder is. He said a neder is a tefilla. We ask Hashem to listen to our words and impose an issur (prohibition) as a result of our words. And Hashem answers our tefilla and makes an issur. So there it is. It’s a syag liprishus, a fence for abstention. Of course you have to be careful not fool around with that; it’s playing with fire if you’re careless with it. You have to use it in the right way, and sometimes with precautions, such as in case you are over (transgress), you’re going to give yourself a fine. Then little by little a person can train himself.
Now there are other methods, one other method is not to have nasheri in the house, and although your children might like to have it, make it your business that only outside of the house they eat these things. In the house they shouldn’t bring in any cake, shouldn’t have any candy in the house at all. For the sake of the person who needs this treatment, there shouldn’t be any temptation in the house, that’s going to help a little bit.
I told you beforehand I’m not an expert on this, but there are some common sense etzois that’ll help out.