Recognize your behavioral triggers. Could be anxiety, stress, etc. Try to actively recognize how you’re feeling before you engage in an addictive behavior, and then either do a substitute activity or find ways to (calmly) move your thoughts or feelings to a different place. The key concept is to divert your thinking that produces the addictive behavior.
Just my two cents, not a doctor but have broken an addiction or two.