Divalproex sodium is also used to treat the manic phase of bipolar disorder (manic-depressive illness) and helps prevent migraine headaches.