Bad habits are hard to break. Here's the latest trick someone passed on. Put a rubber band around your wrist and when you catch yourself, snap it.
Don't know if it works, at least it sounds fun.
Just don't let anyone at work get word of it... or it'll turn into one big rubber band snapping match, your own private version of Jackass xD