An anti-inflammatory diet or low-fat diet may help you avoid headaches. The Mediterranean diet is high in omega-3 fatty acids, which are believed to lower inflammation and even alter your pain perception. It’s also low in omega-6 fatty acids, which have the opposite effect. That makes this diet a popular choice for people with headaches.