If someone is anxious or having a panic attack, there are many things to say, but these few things may seem helpful, but in reality they make people feel invalidated which makes them feel worse about themselves.
1. "You're fine."
Obviously if someone is upset or anxious about something they are not fine, and you telling them that they are makes their feelings feel invalidated. Allow people to feel what they are feeling instead of surprising it.
2. "It really isn't a big deal."
No matter how small the issue may be, in that moment that issue is a big deal to whoever may be upset about it, something that is not a big deal in your eyes may be a huge deal in the moment in someone else's eyes.
3. "You should be thankful for your life, there are people who have it much worse."
This one goes for more than just anxiety, it also applies to depression in a big way. When someone is upset about something they have every right to feel that way. And although there are many people who have it worse, that does not mean that people have to push their own feelings aside.
4. Ignoring them.
It may be helpful to leave people alone when they are upset, but ignoring them is different. This makes them think you don't care about them at all. And when someone is upset they most likely will want to talk about it. Tell them that you will listen if they want to talk but you will leave them alone if that is what they want. Ignoring someone is never helpful.