It is used to treat manic episodes associated with bipolar disorder, epilepsy, and migraine headaches.