Never use artificial sweetners as they can cause this.
Another possible culprit is iron-deficiency anemia, so you could get checked for that. If you don't have iron in your blood your brain is robbed of oxygen.
Fermented sugar in the body produces alcohol and one of the byproducts
of the liver processing the alcohol is Acetaldehyde, a toxin that gives the hangover effects after much alcohol consumption.
Look up an anticandida diet, mainly staying away from carbohydrates
(all grains, sugars, sweets , breads, pasta, sodas.dairy etc) and anything with yeast in it. Consume Coconut oil (it is anti-fungal and candida is a fungal/yeast overgrowth infectious condition) up to 4T daily, but start with 1T and gradually build up to 4T daily.
Probiotics of good quality (in the high billions, multiple strain and live/needs refrigeration) will help restore your healthy gut flora.
It takes time, but you'll feel better soon and you may avoid other serious problems in the future.
I hope this helps but please note this does not constitute medical advice.
Best wishes.
Niko