Only a small number of people start the use of Xanax without a valid medical diagnosis. Xanax functions as a sedative to alleviate feelings of agitation, sadness, anxiety, or nervousness. Your physician may prescribe Xanax to alleviate panic episodes or assist ...