I personally would not mention anxiety if school asks you for reasons of your previous withdrawal. I would say I had a family emergency. That would lead to the least amount of questions to you. For example, if you tell them about your previous anxiety, they may ask you questions like how do you deal with it now, how do you know it will not happen again, what changed etc, etc...
Since your grades were fine, you do not need to be anxious about anything (I know it is easier to say than do) since while you are IN SCHOOL grades are pretty much the main thing that matters to succeed.