Anti-anxiety medications can help control the symptoms of panic attacks. They are usually taken when you feel that you are about to have an anxiety attack.