In most gun training they say as previously stated "shoot to kill" but this is said with some details. There are some details that usually are presented with these situations; The target is indeed(thoroughly confirmed) trying to attack you or an individual, The situation is around a critical level (Typically noted by around five or more stages of situational conflict or danger) based on a certain scale. Many people, both operators and martial artists use this in regards to lethal force. I had a long post written up, but I really don't think it was necessary. Simply put, seek help first and foremost. Evade the situation as much as possible, whether it be talking them down or simply seeking the path of least resistance. If these are not applicable then restrain, disable, or dissolve the situation. None of which are lethal. Restrain the person whether it be full contact or blocking their path to attack, disable any weapons or abilities to attack, dissolve the situation through communication. I personally wouldn't kill, I was always taught by instructors to disable the situation. If you hit the critical level and your instinct is to kill you might have already crossed the threshold of rationality.
I guess I'll put this here any way.
Typically situational danger is scaled somewhat( Again Somewhat, do not quote me on this) like this: a neutral situation in which nothing is truly happening, a conflict that can be talked out, a conflict is present but the other individual(s) are not acting on anything, the conflict is very apparent and the individual(s) has a high chance of action or the conflict can no longer be evaded(verbally) and the individuals are acting(Evade or disable), the situation is critical and typically by now the conflict has to be disabled immediately or long enough for support(police or other law enforcement individuals). Some scales have another step in which lethal force is used.