Yeah that law definitely has nothing to do with self defense. That was literally titled "Armed Career Criminal Act" when it was ratified.
Plenty of states allow brandishing in self defense, mine being one of them (go Texas). Chapter 9 Sec 9.04 states:
And of course, civil immunity is granted under Chapter 83, as a "Castle Doctrine" state you may use or threaten deadly force in certain self defense situations.
TL;DR if acting in self defense, one can brandish a weapon in Texas. If you have to ask when is a good time to brandish or discharge, then that is not a good time to brandish or discharge. When your life in is immediate danger only.