It could still be health related. Head shaking is an absolute nuisance to get to the bottom of. I ride a head shaker and it took around a year to find something that worked. Saddle, bridle, girth, teeth, back and feet were the first things checked. After that, I removed the nose band in case that was annoying him. Then I put on an ear cover. Then I tried a nose cover in case of dust or pollen allergies. Then I tried a mask that blocked sunlight and worked like sunglasses. Finally, I tried a full face mask that covered everything from his ears, the whole way down to his nose, and that seemed to mostly help.
There's a nerve that runs down the horse's face called the trigeminal nerve. If it's too sensitive, or it's malfunctioning, it can cause headshaking. There are several medical options outside of equipment, some of which are surgical. Either way, headshaking is a sign of discomfort.
I know melatonin helps some horses, and a green algae pill. Those are the pills that my trainer uses on her horses who toss their heads. I would contact your vet and see if he can prescribe you any medications that might help if it isn’t health related.
Like Ryan R said, it is sometimes health related, so definitely get it checked out. You can’t be sure how to help them if you don’t know what is causing it first. Some horse at my barn have this problem, and we have used an ear bonnet, or a dusk mask. You can find a dusk mask on amazon, it just attaches to the noseband and covers the nose with a kind of filter that helps the dust from getting in their nose and bothering them. We have used ear bonnets before because sometimes bugs have gotten in their ears and bothered them. But you can’t be certain about what to do until you know what is causing it. It sounds like it has gotten pretty bad, so I would definitely get the vet out.
Head tossing can be related to a medical issue, so if you haven't already, consult your vet. If you have and there's nothing wrong, I'd try fussing with her bit and bridle- try no noseband, try bitless, etc.