The Massad Ayoob LFI-1 course lays all of this out in easily understandable detail. LFI-1 is not especially cheap but if you are going to carry it is worth every penny and more.
This topic is complicated for a forum like this because you ask several questions that are related but require different answers.
Imminent danger is a moving concept that has to start with you. Are you old, young, handicapped, female, what is your training in combat (hand-to-hand, knives, swords ...) just for starters. A 100lb female against two 200lb males has an easy case for imminent deadly threat unless she is a champion kick-boxer (for example).
A person in their 60s facing two or more persons in their 20's may have a good case for imminent deadly threat. Again, it depends on the provable capabilities of the oldster.
Once you shoot someone everything you have ever done is up for inspection.
If your jurisdiction requires you to be held pending investigation for possible charges then you will go to jail no matter what. Do you know the requirement in your jurisdiction?
They can all be different by city, county and state.
I was dumbfounded by the complexities of this. If you are going to carry, attend as many classes as you can. I get no commission but highly recommend the LFI-1 because it deals with this exact topic and 10 more you have not considered, but the opposing attorneys have.
Remember, every projectile that leaves your weapon has an attorney attached to it.
Front Sight describes it as problem 2 and 3. Problem 1 is surviving the fight; problem 2 is surviving the case by the city/state; problem 3 is surviving the civil lawsuit the adversaries survivors will bring because you have deprived them of their breadwinner.
You have to survive all three and the truth is there is no winning. If you prevail you get to keep what you already have, your freedom (but not your money).
You might think I am against self-defense.
I am most assuredly in favor of being prepared to protect yourself but this requires more than trigger pulling.