Don't give up. Here is a review of the behavioral methods for changing behavior. Buy only limited amounts of wholesome food, no sweets, soft drinks, alcohol, or high-fat food. This is easier if you never shop when you are very hungry and limit yourself to exactly what is on your shopping list, no matter how cheap the ice cream is. Avoid situations where you will be pressured to eat, drink, swallow, or smoke something you don't really want, such as bars, parties, dinners, certain friends or relatives, etc., at least until you are under good control.
Warning signs can be very effective.
Place a picture of a fat person on the refrigerator or a picture of lung cancer on each cigarette pack. Friends supporting and praising your self-control are powerful. Someone nagging you, however, will probably harm, not help. Urges to eat other places would gradually extinguish. It is an especially good idea to work or study in one place and only study there.