I understand why they may have said that Depakote may help, but I’m not sure that is the answer.
Something that does help (in conjunction with medication) is therapy.
In terms of medications, I really think that it depends. A doctor will be able to understand a more detailed explanation. Are the thoughts intrusive? (come from nothing or a trigger and are distressing)