* Avoid conflict - Avoiding a violent situation should be your first priority. If you for example are many feet away from a knife attacker and you draw your gun, the authorities will ask "well why didn't you run away when you had the chance?" If you have a way to retreat and you don't take it, you are going to look like the assailant. If you can safely escape be it on foot, in a car, or bike then do so unless it puts you in more danger.
* Attack only when attacked - Under no circumstances can you make the first attack unless you are in physical danger (ex. armed robbers, kidnappers, etc.) Until your assailant throws the first strike, you cannot legally defend yourself. Some schools teaching combat for self defense tell you that it's best to strike first if a potential attacker is in your face. In reality, this isn't self defense according to the law. If someone is insulting you and getting aggressive, it makes no sense for me to throw a punch in order to "defend myself." Self defense only applies if you are responding to an attack at the present moment. If someone wants to fight you and you say "let's take it outside...", you are no longer practicing self defense because you are consenting to it. If someone is in a road rage and you apply a wrist-lock, you are no longer practicing self defense because you are initiating the attack. It doesn't matter if someone was "asking for it" or you needed to "teach em a lesson..." Nothing justifies you making the first attack period.
* Prove your innocence - You'll need to prove your innocence under a court of law by providing evidence that you acted in a lawful manner. Video recordings, eye-witness accounts, etc. of you trying to defuse a violent situation and avoid conflict are all examples of proof of your innocence. Keep in mind that your aggressor can also do the same so it might turn into a legal battle over who acted in self defense.
* Use proportionality - As i said before in previous posts, the amount of force used must be proportional or equal to the attack. A non-lethal threat must be met with non-lethal force. A lethal threat can be met with lethal force. Some self defense schools don't follow this principle and that's what will get you into legal trouble. This video is an example. Shooting someone multiple times because he or she punched you isn't using proportional force. Keep this in mind at all times.
* Address the most immediate threat - You must attack in self defense at the present moment you are being attacked. Not before an attack happens. Not after an attack happens. If someone's threatening your life, you have no business attacking that person because there's no threat involved. If you get beaten up in a brawl and your attacker leaves, you cannot get up to continue attacking then claim self defense. That is retaliation. If you do not, your claim to self defense fails.