If they are physically attacking you and threatening to or attempting to kill you, yes, Whoopie, it is okay to defend yourself.
In fact, it really is an equal opportunity situation where it is legally OK to shoot those attackers in defense of your person, or in some states, in defense of a third party who is being attacked, regardless of race, creed, color, nation of origin, pronouns, identified gender orientations, or sexual orientation.
(Sheesh, did I miss anything?)