Google says: Divalproex sodium is used to treat certain types of seizures (epilepsy). This medicine is an anticonvulsant that works in the brain tissue to stop seizures.
It started out as a seizure medicine, but is now also used to help with some types of pain as well. My husband was on it for many many years for his seizures.