Xanax is approved to treat only generalized anxiety disorder and panic disorder. However, your doctor might sometimes prescribe Xanax off-label for certain other uses. These include short-term treatment of temporary anxiety symptoms.