In general, you need to fear for your life and you need to be sure you try to back up and try to avoid shooting the perp. This varies from state to state. In some states you do not need to retreat, but for your own good you should try to retreat before using deadly force. If it ever goes to a lawsuit it can greatly improve your position.
Also don’t use target loads in a defensive gun. Be sure to use hollow points they are safer and more effective.
Most states are stand your ground states, which means you have no duty to retreat. But some are not and you should know which one your state is.
Apart from that, there are multiple elements of legal self-defense. A reasonable and objective fear for one's life is only one of them.