Try to keep a full, satisfied tummy throughout the day so you aren't hungry at your desk near the candy--it will be the first thing you reach for. If this doesn't work, get up from your desk and go for a walk around your office every time you experience a craving.
Ultimately, the best thing is to avoid having candy at or near your desk, if possible. Or, if you keep some at your desk, keep something that you don't like.
But if you do need a candy fix, I'd recommend opting for organic dark chocolate, the only type of chocolate that has any type of benefit that outweighs the calories and sugar. Organic dark chocolate is loaded with antioxidants and is a much better choice than the typical candy bar chocolate. You could keep a bar in the office and nibble on it when you want something sweet.
But be very careful about controlling your portions, if you do give in to the candy temptation. Studies show that most people will not stop at one piece of candy once they begin eating it. So I really don't recommend even eating the one piece. If someone believes they have willpower enough to just eat one, that's their personal choice. From experience, this is never the case! ;)
If you must have a small candy bar or a few pieces of candy, why don't you reserve it for a time when you can really enjoy it, such as after lunch as a dessert or on a coffee/tea break.
If you feel the urge to nibble on candy through out the day, I agree with JJ Virgin and make some healthy alternative snacks to bring with you. I highly recommend sliced apples with peanut butter or a trail mix of nuts, dried fruit, and a (small) portion of dark chocolate chips to please the sweet tooth. In the end you will feel satisfied and have less of a need to head for the candy bowl.
Lastly, why don't you take the initiative to change tradition this year! Instead of bringing candy into work, why don't you suggest everyone bring in a healthy treat instead? Have everyone bring in their own favorite trail mix version. Have a bake off contest and see who can bake the healthiest AND tastiest muffins. Use food items that are consistent with the season/theme such as pumpkins, spiced apples, cranberries, etc..so you don't have to feel short on spirit.
P.s. Feel free to share some of those muffin recipes with us! :)