Because your brain chooses more rewarding behaviors, you need to identify behaviors that are more rewarding than your bad habits.
Treating the anxiety at the source of your distraction is analogous to having some pain in your body and getting at the root cause instead of taking pain killers to temporarily numb yourself — which masks the symptoms of the problem, and can cause you to become dependent.
This involves noticing the trigger (anxiety), the distraction behavior (eating, drinking, watching TV), and the reward (feeling better because you are distracted from the trigger).
When your ancestors found a new food source, their stomachs sent a cascade of signals to their brains that resulted in dopamine firing.
Whether your vice is food, alcohol, social media, work, or television, when faced with increasing anxiety, why does your brain urge you toward distractions?