Pretty much what Portia said. Irrationality while in the throes of anger is not an ASD/depression/anxiety trait, it's a normal one, and in a gifted kid with emotional intensity, the response is similarly intense.
We find that the key to dealing with this is to send our DD10 off to be by herself to deal with her emotions, because engagement at that point will only bring escalation. We wait until she's ready to have the conversation in a more rational frame of mind. Sometimes that sends her into an emotional feedback loop-slash-death spiral, and we have to check in with her from time to time in an attempt to short circuit that.
Only once the raw emotions have been brought under control can constructive parenting begin.