You have a huge challenge. I am fortunate because most of the snacks my husband brings in the house are things I do not care for (cheez-it crackers, pretzels). However there are other times he brings things with sugar.
First, I would have healthy choices available for you. Remind yourself of how good you feel-both physically and emotionally when you chose them. If you are having a treat too, you will not feel like you are missing out.
With the unhealthy snacks, I remind myself I can have it. I can have as many servings as I want. However, I get to own the outcomes. I know how it makes me feel, and makes me want more. And I don’t like that path. So that is what works for me. And sometimes I have one. Please know, it has taken a long time to get to this point. To actually be at choice and not wanting the outcomes because I am choosing health, good sleep, etc.
Be patient and acknowledge the changes you do make about it all. For example, there may be one particular sweet that is easy to pass on for some reason. Acknowledge that and continue on.
Some folks have their spouse lock the sweets in a cabinet. Or store out of site. When the neighbor gives us cookies every few weeks, I make sure they are out of site when I open the refrigerator. Not long ago that would not have made a difference but now it does help. But when I do see them I tell myself I can eat one or more. I am always practicing choice and the outcomes that go with it.
I wish you luck!