From your original post I am not sure if you have a problem around food or if you have the occasional craving that hard to deal with.
I have been a life long food addict. Now I am not sure if food addict is quite the right term but at the moment I can't think of a better one. For most of my life I have been unable to control my bingeing but I have never been anorexic or tried to self harm, I have just had a terrible time trying to control what I know is doing me no good. I used food for all the wrong reasons and it's taken me until now (I am 61) to realise it's only food and overeating won't solve a **** thing. I won't go into details suffice it to say that I have bought truckloads of Easter eggs in my time only a small amount of which have ever reached my kids.
These days I don't binge at all. Now that is a huge statement but true. My diabetes was undoubtedly, at least in part but a large part, caused by my uncontrolled eating habits. I know that some diabetics are this way through no fault of their own but mine was all my own work. No-one in my family was ever diabetic...no-one at all.
So when I was diagnosed with diabetes I realised I had to change big time. Like others on here, I lowish carb. I find that protein and a lot of veg help to keep me full and quite honestly it's been a long time since I was hungry. If that feeling of 'If I don't have this I will go mad' hits me now I will deflect or distract. I mean I would find something else to do. A good fast walk used to be good but my exercise options are a less now due to various physical restrictions. Still, I would recommend exercise, fast and vigorous if you can. Get away from the craving, don't choose to bake or cook anything on the days you know you will go overboard, stay out of the kitchen if it's a problem area for you. Grit your teeth and drive past Macca's or whatever is your poison. Turn up the music loud in the car and SING until you are past! In short do whatever you need to do dump the craving that is ruining your life. I do know that sometimes a celery stick just doesn't cut it and I know that there are some who can only eat one or two squares of dark chocolate but that is a way too dangerous place for me
Look in the Recipes section on here. there are a lot of recipes for a sweet or savoury tooth that is low carb.
Identify the places and times when you find it hard to resist what you crave and make alternative plans. Planning will save you most of the time but there will be times when you get it wrong but I truly believe the saying that falling over isn't failure, it's not getting up and trying again that's failure. At first you might fall a lot but it gradually gets easier and one day you will find that you don't do it anymore, that you are in charge.
Good Luck and I know that this is a bit rambley but I hope it's is of some help.