Bring a container to work for free dessert food windfalls. Keep the container in a desk drawer.
I used to have a rule: If it’s fruit, go ahead and eat it. If it’s plain salad or veggies, without dressing, go ahead. If it’s anything else, it has to come home. Delicious brownies or cookies from that great bakery they got for the meeting even though all the executives say they’re off sugar for life, I’m talking to you.
If the treat is good enough to eat, it’s good enough to bring home later to have with a nice cup of tea after dinner instead of snorfeling it/them down in front of the computer. This will prevent you from having another dessert later on top of the one you ate at work, while still reaping the rewards of free and delicious dessert.
What about the kids and mate? There’s always someone with a candy dish on their desk. Poach a few for them and you’re good to go. All of it goes in the back seat, nowhere near your hands while you are driving. Not that I don’t trust you, but I’ve been there myself.
If the treat is just so-so? Don’t eat it at work or at home, because you are not a human garbage can!!