HEIST, you speak wisely, but I would add a slight difference to your assertion here:
No matter what, whether I don't shoot or do, I will die. If I manage to take cover and kill the first intruders, the following ones will still shoot me, if they are law enforcement. You are not allowed to get away with shooting a brother officer in that sort of situation. I would not be able to surrender fast enough.
I don't think that's necessarily true. If you think you are being attacked by criminals, and successfully repel the first wave of invaders, perhaps killing one or more of them (in hindsight when you find out they are LEO it will be unfortunate, but we don't have that luxury of knowledge in this scenario), then the force will look to re-group and re-assault your position, and yes, assuredly, they will want to kill you. BUT, *if* you have a strong enough defensive position, and enough firepower to hold them off, then you can hope and pray that the media shows up with cameras, and THEN and only then announce loudly with a megaphone for example that you are coming out unarmed to surrender since you have learned they are LEO since the initial criminal assaults (in your mind). Then, more likely than not, they won't be able to murder you as you surrender. Then you get your day in court to explain how you did nothing wrong, and it was plain self-defense, and you just may win if you can only get your day in court. Dead men don't tell tales, and the cops know this. So the KEY is having a very strong defensive setup, stuff like security bars and other measures giving you the upper hand in the ordinary no-knock raid scenario, which of course, for all you know at 4am is criminal home invaders.