Cravings usually happen because you've killed most of your gut bacteria by filling yourself up with sugary, salty, junk food.
Obligatory infographic below. It takes at least a couple of days of very strict healthy eating for your gut bacteria to recover and stop craving, but it's reasonably quick to do compared to most diet/fitness related things:
Stuff like spinach and tomatoes are good. Try some healthy salads with good olive oil (best kind of oil you can get). Try some unsalted nuts, or oily fish, berries, seeds, leafy green veg, eggs, and other things like that.
Get rid of most of the "brown carbs" and cut out all refined sugar (sugar from fruit is OK). Refined sugar might as well be poison for the effect it has on your body. Alcohol is even worse. Bread/pasta and other refined wheat/grain-based things are generally unhelpful if you eat a lot of that. Wholegrains are better. Potatoes are OK in moderation too.
Remember that the more refined carbs you eat, the more it's going to mess with your blood glucose levels, and by implication it will also cause insulin resistance (which is bad. excessive insulin resistance = T2 diabetes, which eventually leads to fatty liver disease)
Also:
Are you drinking enough water?
Do you drink too much caffeine?
Do you do enough exercise? Getting your heartrate up for at least 30 mins a day makes a big difference to the way you feel.
Do you spend enough time outdoors?
Are you getting enough restful REM sleep? (don't stare at a screen in the hour before you go to bed, let your brain "switch off")
Do you get alot of stress or other 'triggers'?
Are you deficient in any essential fats/proteins or vitamins/minerals? e.g. omega oils, vitamin D, magnesium, potassium. a daily supplement may be useful if you are severely deficient in things.
Do you suffer any severe general symptoms of poor health that could be attributed to T2 diabetes or deficiencies? e.g. dry mouth, dry throat, dry/flaky skin/nails, excessive tiredness/lethargy, easy bruising, fuzzy eyesight/hearing?
Do you get any kind of intolerant reaction to certain foods? e.g. chest burning after eating things which might be allergens such as drinking milk?
Bottom line -- the physical affects the psychological, and vice-versa; everything is connected. The food you eat and the amount of exercise you do will affect your mental health and your ability to maintain focus, keep self-control/discipline and your stress/anxiety levels.