You've gotten some good advice.
I'm wondering if you are eating too strictly at times, then "blowing it" because your body is craving something you're missing. Like carbohydrates. Good carbs, like berries, veggies. NOT cookies and cakes and baked goods!
Here are some ideas:
Find substitutes for foods you have cravings for. If you crave sweet foods, fruits are good (berries, persimmons this time of year), herbal teas can be sweet without adding any calories to your diet.
Avoid carbohydrate foods that contain less than 2 gm. of fiber per serving (this cuts out most cookies, cakes, crackers). Carbohydrates naturally come with fiber, which is a natural appetite supressant.
Avoid high fructose corn sweetener, which stimulate appetite.
Avoid hydrogenated oils, which the body cannot recognize as real food because they are man-made.
Get some healthy cookbooks, and find some quick reciped that you like, and some quick snack ideas, so when you are hungry, it's easy to find something good and tasty.
Some people seem to be under the impression that if it's healthy, it can't taste good. I personally éat foods that are both healthy (most of the time!) AND taste good, and I won't sacrifice one for the other (but to me, sugary, high-fat foods DON'T taste good). You CAN change your taste buds, and learn to like healthier foods.
We may be in the 21st century, but our bodies are still made to process food in the way they did from the beginnig: whole, real foods, not man-made foods or processed foods. IMO, most processed foods don't satisfy the appetite, because they are calorie rich and nutrient poor. Our bodies crave nutients, so giving them nutrient-rich foods helps regulate appetite.
Find out what your trigger foods are, and don't let them in the house. Potato chips are one of mine. I don't eat them often at all, because if I start, I can polish off pretty much a whole bag in a day or two!
Also, figure out what triggers your going back to not eating healthfully. Have you not found healthy foods you like? Do you give in to temptation to buy things at the grocery store, then end up eating them because they're there? (For this last one, keep a stock of healthy snack bars in your car. Then, if you are in the grocery store and tempted by unhealthy foods, think of the yummy snack you have waiting for you, and you will be better able to resits temptation.
If you drink sodas, get rid of them. Change to water, or water with a few drops of stevia in (there's a new stevia sweetener advertised iin Vegetarian times that comes flavored, to add to water to make orange-flavored water, etc.)
A good book for making healhty choices (but which doesn't dictate any particular way of eating), is "Picture Perfect Weight Loss." It has side-by-side photos of foods and meals with the same calorie count (pretty pictures, too!) that help train you to make the right choices...but they are still your choices.
You don't have to do everything at once, but choose to make changes one or two at a time.
YOU are responsible for your own health and well-being. NO ONE ELSE can make those choices for you.
Good luck