Something that helped me a lot was timing the worst cravings. Knowing that the worst part of it would be over in say 12-15 minutes and just thinking "I can get through this next minute" and doing that over and over until it passed.
In rehab te addiction psychologist said that contact with water really helps bad cravings. She said that it comes from the fact that we were developed in the womb, surrounded by watery liquid so at some level this is unconsciously comforting. If you are at home you can take a shower or a bath. if you are out in public, go smash your face with water, or dap water not he back of your neck, inside or your wrists or wash your hands for an extended period of time.