Write it out. Writing out what you want to accomplish each morning either before you start work or before noon, helps to solidify the idea in your head and keeps you focused and on track.
Track them for a couple days, putting a tally mark in a small notebook every time you get an urge. Write out a plan, before you get the urges, with strategies to beat them.