Assuming the doughnut isn't actually pleading with you (if it is, you have bigger problems), you simply need to work on avoidance. First, locate your motivation with a balance sheet; remind yourself about the evils of too much sugar, saturated fat, and calories, not to mention the lack of nutrients. Remember, too, that sweet treats can trigger swings in your blood sugar, priming you for energy crashes followed by more cravings for sweets.