Western law is founded on a presumption of innocence. Police are only shooting criminals if they wait to draw their guns until after the suspect has been arrested, charged, tried, and found guilty.
Until those things have happened, they are only able to shoot civilians (or each other) - the one exception being pursuit of convicts engaged in a prison break-out.
Summary execution without trial should not occur in a nation that aspires to become civilised.
You realize that the laws for what counts a sufficient threat for civilians to shoot is the same as for cops? They have a
reasonable belief someone is pulling a gun on them to shoot them, they can shoot and face only civil penalties if it turns out it wasn't a gun.
Where the laws differ is a matter of what came before. A civilian who initiates the confrontation isn't allowed to shoot even in a clearly deadly threat. (You start using someone as a punching bag, they pull a gun on you--they can pull the trigger with impunity, you would be guilty of murder if you shot them instead.) Cops do not have this restriction as most such situations will arise when they confront a criminal.
That differs from State to State... but you are mostly correct... it is not self defense if you start the fight. However, if you make efforts to disengage from the fight and the other continues aggression, then the situation is "reset", in that they become the aggressor. So, in your example were the initial victim pulls out a gun, if the initial aggressor backs down, then deadly force is no longer justified.
Just because someone shoves you and says they are going to kick your ass does not mean deadly force is justified. There is a concept called "force multiplier" that is used to determine if deadly force was justified in an otherwise hand-to-hand situation. Who is trained to fight? who is larger than who? how many people on either side of the altercation? How easy would it have been to retreat?
Don't shoot people. Learn to deescalate / evade. Shooting is for those cornered or protecting someone else from deadly force. You can't shoot someone that is already pointing a gun at you... that's just suicide.