I personally wouldn't buy anyone food as a gift. But it seems like your husband really is just trying to be sweet. Literally
. Anyways I have this problem with my mom as well, and when she buys cookies, or candies, I ask her "Mom, please can you keep this in your room for me?" and now she keeps most of the bad foods in her room. Even if it's a gift you don't have to eat it. Tell your husband "thanks, this is very nice of you but I really can't be eating this" or you can just throw it out secretly and lie and say you ate it. "all gone
" One thing I also think you need to do is have a long chat with him. Tell him exactly how you feel after eating his chocolates and candies. Also tell him how hard it is for you to lose weight and that you need to be healthy. Maybe you'll need to be tough with him on this and say "if you buy this for me, I'll have to throw it out". He needs to be supportive. You need to demand your needs sometimes for people to get it.
My mom can have 100 chocolates in her room for a year. Slowly taking 1 every once in a while. If someone gives me 100 chocolates, I'll have none left the next day. So obviously I need to say NO CHOCOLATES AROUND ME OR I'LL GAIN A MILLION POUNDS! She doesn't understand why I need to eat them all at once. Maybe your husband also just doesn't understand.
Anyways don't feel bad for throwing out junk-foods, you aren't gaining any nutrition from it in your body whether you eat it or not. If it hurts your husbands feelings, I'm sorry but maybe that's what it will take for him to realize how important this is to you. Maybe he'll finally get it. Good luck, hope this helps a little.