Sorry, there's no magic pill to make addictions go away. Glutamine, chromium, 5-HTP, and sometimes a big dose of Vitamin C can help, but ultimately it comes down to you.
As addictive as sugar is, I do think there's a psychological component that at least -begins- a sugar maelstrom. So, first spot check your life. As cheesy as this sounds, are you lacking sweetness in other areas of your life?
There are a lot of ways people overcome sugar addictions. It really depends on you. Here are a few strategies -- the perfect fix for you really depends on your mindset, physiology, and whatever else scientists like to pathologize.
1) Get back on good carbs. Carbs aren't bad -- it's refined junk and sugar that wreaks the real havoc. So indulge in yummy fruit, sweet potatoes, pumpkin, etc. Get your kicks on good stuff and soon refined sugar will start to taste like the acrid junk it is. You don't need a huge amount either. Just try adding like a sweet potato or a fruit to your meals. Plus, if you tell yourself your ALLOWED to have carbs, just good ones, eating cookies won't seem so "horribly but alluringly" attractive.
2) Go cold turkey. Personally I don't find this works well in the long run, as it more just tacks a band-aid and I find the "rubber band snap" is pretty nasty. But some people find success with it. Basically, go low carb for awhile, stick it out, embrace the suckage, and eventually lose your desire for it.
3) Wrangle your reptilian mind. Be MINDFUL. When you feel the urge, slow the fuck down. Think about it. If you take this cookie, you will have a momentary hit of pleasure. Then have you'll feel like crap. Keep on doing it and you'll get fat and have low-grade inflammation. Whereas if you say "screw the cookie," you'll be proud. In essence, work through your thoughts, RELAX (tension will make you more likely to hide in a sack of sugar), and reason out what you really want vs. what your childish side is crying for.
4) This is in conjunction to the previous three. Expect that you won't be perfect. You may have a cookie. But don't fall into the "I fucked up so now I must EAT ALL THE THINGS" You can always stop eating -- one slip up doesn't justify another.