Accountability and commitment are some of the things that are probably the most powerful here. I've already instituted this in part because of these issues. My phone goes away during dinner with my family. So it is a little bit backwards, but the tools apply whether or not the thing that are tugging you in the wrong direction are pizza and junk food or work.