You can try exposing yourself to your triggers and doing your best to resist your urges. This helps you grow more accustomed to your triggers so you're less likely to complete your rituals.