Most states do not specific allow it, a few do.
Texas I believe considers display of a lethal weapon like a firearm to just be use of force, not use of lethal force.
Most states however consider display or use of a firearm only legal when the actual use of lethal force is. So it must meet the criteria to use it, just to legally draw it, you can't just draw it to try and keep the situation from getting to that point.
In most states it is a highly discretionary situation after, frequently judged by a jury.
There is things like a disparity of force, being that if you are a woman vs a man, small, injured, elderly, or half the size of the individual you may get more benefit of the doubt.
Also if there is multiple of them, and one or a lot fewer of you.
If however you are of similar size, or similar in number, and not just what you think is similar size or numbers, but other people do, then it is much less likely to be judged in your favor.
Other things change the scenario too, like if you are 'mutual combatants'.
If you said things, or challenged someone, you can be seen as no longer an innocent victim but a participant in a mutual fight, even if they attack first.
If you did anything to keep your ego in tact it can be used against you after to show you were not doing all you could to avoid confrontation.
If however you made it quite clear you want no problems, did all you could to back down from any challenge, and still got attacked, that counts in your favor.
In most states people cannot really give you legal advice on it, because it will be entirely discretionary after the fact. A jury will get to decide if what you did was reasonable.
A lot of people with little to no real life experience with violence think things are a lot more like the movies or the school yard playground.
Where you can exchange blows and defend yourself without using a weapon, and that by pulling a weapon you took it to another level and are the one that went too far.
Such people can then determine your fate.
There is plenty of real life examples you can read about with nightmare scenarios.
We had a good thread on one not long ago in Arizona, where a guy was attacked by 2 women in his driveway. At some point a third guy joined in. They had him on the ground and were kicking him If I recall correctly, on his own driveway, he pulled a gun and shot.
I don't think anyone died, yet he still spent a lot of money, and had a hung jury, and I think more were in favor of guilty than in favor of acquittal.
So the prosecution tried him again, and I seem to recall he didn't get a not guilty verdict that time either, but wasn't convicted.
He had a restraining order that prevented him from even going home to his house for the length of the trials because it was too close to the attackers' home, and his wife had to ferry belongings back and forth while he paid to rent another place.
This guy had expert witnesses, including the respected Mas Ayoob, testify on his behalf, and he still barely missed going to prison for using a gun in gun friendly Arizona to defend himself from multiple people kicking him while he was down in his own driveway.
So nobody can tell you that you won't go to prison.
Likewise nobody can tell you that its not a good decision to use a weapon.
It is not a duel, and you are not honor bound to suffer any temporary or permanent injuries for a fight you didn't even want to be in. Yet the culture of the jurors may feel otherwise.
Many grown men can also do serious damage resulting in lifelong injuries in a matter of seconds.
Once you are down or unconscious you also no longer have the option to decide you actually do think your gun might be necessary.
Many street fights today end with the loser being stomped to death, or kicked or stomped in a way that leaves someone with long term injury or disability.
Even conscious, once grappling with someone deploying your firearm is a lot more difficult, keeping control of it, not letting it get taken from you, etc
The other individual may very well not have any such inhibitions, and if they get you down, unconscious, or get your firearm will kill you.
So its your judgment call, and a jury gets to tell you if it was acceptable to them after the fact.