Struggling with battle between primal brain and prefrontal cortex

I’ve used overeating to avoid difficult emotions for almost 20 years and recently joined Scholars to address this. When I get a craving, my toddler primal brain kicks in full force with “I want X, I want X, I want X.” Sometimes I’m able to do the work to overcome the urge and not eat X (understanding that it’s only my primal brain that thinks I need it), but the craving and thought returns and lingers (last time for 4 hours) and I eventually gave in just to stop the thought battle inside my head. Do I just need to continue to address the urge however long it lasts? The problem is that when I am preoccupied with the craving/thought/work, I am unable to concentrate on any other task. It feels easier to just give in, so I can get on with my day.