Try cutting the sugar, caffeine and nicotine first. Your body is already coping with tons of chemical substances and adding another one to correct an "imbalance" seems like a fast track to a rapid out-of-control spiral.
There could be a lot of factors behind your headaches. I hesitate to call them migraines, because with your diet and lifestyle, they could just be chronic headaches... migraines are a totally different beast. I'm amazed that your doctor(s) haven't told you to get off the sugar first, before trying any kind of migraine treatment. I get NASTY headaches if i've had too much sugar. Like "i can't shake it for four days" kinda headaches.
I used to get very frequent headaches. Like two or three a week. Not super-intense, but persistent. Then i started developing some acid reflux problems, so i made some changes to my diet, cutting out acidic foods and beverages. Now, i'd grown up drinking a glass of orange juice every day with my breakfast since i was a little kid, so this was a tough change. But within a couple of weeks, my stomach started settling down. And you know what? My headaches almost entirely vanished. Gone. History.
My suspicion is that my acid intake was pushing something in my blood over a threshold, which resulted in symptoms of a headache.
Lots of health problems can be tied back to what you put in your mouth, whether it's allergic reactions or just sensitivity to particular kinds of foods or food components.
I can almost guarantee that if you stop putting that .... into your body, you will start feeling better in a VERY short time. If you didn't exercise, you'd probably be dead already.