Panic attacks, anxiety disorders, sadness, etc. are all treated with Xanax. Because this is a powerful medication, you must closely adhere to your doctor's instructions and suggestions during treatment to prevent adverse effects. In medical practice, Xanax is a potent prescription sedative.