Rage syndrome or seizure would not result in a dog guarding somewhere and then coming out for treats and dashing back in.
Does he have a history of guarding stuff?
How has that been addressed in the past - no judgement here, but if he has been punished by shouting/hitting/etc for taking stuff, for growling at you over stuff.. for some dogs its a VERY quick progression to maladaptive guarding behaviour.
For now, leave him in there, make sure he has food water etc, make sure everyone else in the house is safe.
Speak to a vet but probably better, speak to a behaviourist and if you can get video footage without specifically setting him up to trigger the behaviour (you might have to though) do so.
Pain can cause guarding of spaces, so if you've any reason to suspect that do talk to a vet, any sudden change in behaviour should result in a vet visit/conversation, but it may be a behaviourist in this instance is the first step so that you can actually see a vet.
Do not confront, do not punish, do not force unless you have absolutely no choice for his safety and yours.