Commonly people are suffering from anxiety and depression like mental disorders. They always search for medication to relieve their symptoms. Xanax and Prozac are two commonly prescribed medicines used to treat anxiety and depression. But both medicines work very differently. Xanax is a benzodiazepine, that works by decreasing brain activity.