There are a number of defenses that appear to arise from the facts you describe. Keep in mind you are a long way at trial and there are a a number of things a Criminal Defense attorney in your area can be doing for you now, before charges are filed to prevent charges from being filed. Be proactive, not reactive. Many of us in this field, including myself, offer a free consult. There is no sense waiting until the D.A files charges. Work on putting a defense together now.
You certainly have the ability to claim self-defense. The question will be whether or not you have what is called an imperfect self-defense. Since you utilized a device to make your would-be attackers believe that you were armed with a firearm, and the law permits one to use an amount of force necessary to protect oneself. For example if a person threatens to punch someone and no weapon is ever seen, the victim would not be legally entitled to use a gun to defend themself, since they were not threatened with deadly force. In your case you really need to get an attorney and go over all of the details with him or her. And, please remember that since self-defense is a factual defense that this means that in the end it is up to a jury to decide whether or not your defense and claim of self-defense is credible or not.
It would be best to hire an attorney to assist you. There are several things the DA could file against you and it would be almost impossible for you to successfully defend yourself.
You need a good lawyer who knows how to investigate and prepare the case to substantiate the dilemma you faced. Personally, I think this case has good jury appeal--meaning, jurors are likely to want to acquit on these facts. Whether it turns out to be self-defense defense and/or incredible prosecution witness, you've got a lot to work with. Remember, the prosecution has to prove brandishing. That means the witnesses have to show up and tell a credible story.
There really is a lot to work with here.