Having excessive amounts of caffeinated drinks (tea, coffee, cola) can lead to a state of hyperarousal. One tends to be jittery, fidgety, has a lot of tremors especially during writing or doing fine tasks. Mentally there can be a lot of anxiety
and difficulty in focusing on tasks at hand. Palpitations, profuse sweating
sensations in extremities can also occur.
You probably had a panic attack
due to excessive intake of tea.
I would suggest that you gradually reduce your intake of tea to 2 to 3 cups a day at best and avoid any caffeinated drink after 2 or 3 pm in the afternoon as it can disturb your night time sleep.