used to treat certain types of seizures (epilepsy). This medicine is an anticonvulsant that works in the brain tissue to stop seizures. Divalproex sodium is also used to treat the manic phase of bipolar disorder (manic-depressive illness) and helps prevent migraine headaches.