Gosh, what is going on? That sounds a bit like a major binge! Is he taking medication for the type 2 diabetes? It's my understanding that if someone consumes excess sugar with type two diabetes, The excess sugar passes from your blood into your urine, which triggers a filtering process that draws tremendous amounts of fluid from your body. Left untreated, this can lead to life-threatening dehydration and a diabetic coma. That's dangerous. I do know a type 1 diabetic that when his sugar is off, he has rage episodes. He barely remembers it but gets very out of control. What's sometimes called "diabetic rage" can be dangerous, because it may involve behaviors a person isn't consciously aware of. Physiologically, when someone's blood sugar fluctuates, spikes, or drops, it can produce feelings of anger, anxiety, or depression that are out of the control of the person experiencing them. What does your husband say if approached about the amount of sugar he consumes and the violent and aggressive black outs? I'd personally accompany him to the doctor and explain it! And you need to be safe if he is becoming aggressive.
You are right, he is eating wrong food and if he doesn't listen to you, please ask your GP to refer him to a Diabetologist and also he should see the specialist nurse for Diabetics
Here is a good link https://www.verywellhealth.com/is-anger-at-a-spouse-normal-with-diabetes-1087327