Given the described circumstance, it seems as though you handled it very well. You had no avenue of escape, which is definitely a bad place to be when confronted by violence. You didn't point the weapon directly at him, and once the situation deescalated a bit, you called the cops.
I can see where many of the people saying you may have escalated the situation in an inappropriate manner are coming from but he had already escalated the situation by cornering you. That seems to be the most pertinent piece of information that, at least in my mind, justifies your actions.
Marine, NRA member, SAF Defender's Club member, and constitutionally protected keeper and bearer of firearms