I can't add that much.
If you don't want to eat it, don't keep it in your kitchen. Admittedly, that's virtually impossible if you don't have the cooperation of everyone in the house. But there are a lot of folks who keep treats on hand "just in case" or if the nieces/nephews visit, etc. It won't kill the kids to eat carrots when they visit (they'll just act like it will...)
With a gift of food (like a cake or box of candy), enjoy a bite, then throw the rest in the trash and refuse to feel guilty about it. It might preserve the relationship if the giver isn't watching you do that.
For me, it was helpful to just go day by day. I'd think to myself that JUST FOR TODAY I'll eat well and avoid sugar. Once I got through the day, I didn't want to break the streak, so I'd see how many days I could go before a breakdown.
Learn to identify those times when you're just bored and want to munch on something, and make conscious choices. For too many years I just grazed without thinking. If I feel like nibbling I can get some carrots, an apple, or just chew some sugar-free gum.