Hi,
I would say the best thing to do is to distract yourself for a short time, and the craving will usually pass. It's the same with quitting smoking, the cravings usually just last for 3 minutes or so and then are gone. Eventually, your brain will start to rewire a bit and the cravings will get less and less.
Watch a youtube clip, text a friends, take a walk, whatever. Just something else besides sitting and thinking about it will help.