When someone gives me chocolate, I take it to work or something. Get other people to eat it, but not me. LOL I'll indulge in a piece or two, otherwise I may be tempted to pig out on it later if I don't allow myself some pleasure in it.
When I go out to eat and they have these desert menus on the table staring me in the face, I immediately toss a napkin over it. Otherwise, I often break down and get a desert. If I cover it before the meal, I forget about it. And if I don't and still crave the sweet, I get fruit at those places that have it, or I stop at the book store and pick up one Lindor chocolate truffle, since they sell them individually.
I start by not bringing candy into the house, and by trying to avoid places that have it, then by trying to hide it or take my mind off of it when it can't be completely avoided. If it's on display at your office, try avoiding that section of the office, or ask if it can be moved elsewhere. If your family has to have it in the house, ask that it be kept in a cabinet you never look in. I do this with hubby's food vs. mine. We have separate cabinets and separate shelves in the refridgerator. And his stash of chocolate covered cherries is locked away in the center cabinet of the coffee table.
Until he forgot and left them in the accessbile drawer of the table and our two year old was found stuffing one in his mouth and mumbling "daddy's chocolate!"