I even got these allergy like symptoms from lactulose after using it about 10 days. I have no idea how this is possible, as lactulose is a "carbohydrate" and I don´t think that one can be allergic to a carbohydrate.
So maybe this has something to do with the impact it has on the microbiome.
Lactulose is a simple sugar and feeding it to the microbiome will change the balance of bacteria in the gut over time. Many of our good bacteria like simple sugars but so do the the bad ones and they tend to grow out of proportion when well fed. My own opinion is that the bad bacteria are growing on the lactulose. Since the body can recognise this imbalance, it invokes your immune system and you get a reaction. I don't think feeding our gut regular doses of any simple sugars is good for it long term.
Garlic, onion, modern wheat are all high in FOS. When I eat these I suffer from depression, sometimes to the point of suicidal thoughts (and once, action). Recovering from an overdose of FOS, I shift from depression to anxiety before moving back to normal. I also lose energy and gain brain fog. Sounds a lot like your experiences. All of these mood swings, both up and down, can happen in a matter of hours. (I don't have any of the mental illnesses that cause mood swings, it's purely the FOS in these foods.)
As my CFS specialist explained to me, FOS has a negative effect on the growth of E. Coli in our gut. E. Coli makes seretonin, carnitine, ubiquinol and B12; lose our E. Coli and we lose a source of these helpful substances. I take Mutaflor probiotic, which is a Nissels strain of E. Coli, and eat GOS-high foods every day to sustain my E. Coli (broccoli, pulse beans like kidney, red, black or navy beans). This gives me energy, keeps me happy, and I don't suffer from as much brain fog.
The consequence of this is constipation. E. Coli firms up the stool as all those GOS-high foods cause gas which slows the transit of food through the gut. Bifidobacteria helps cure constipation. Nicely textured poo is a healthy balance of both. Resistant starch is meant to grow bifidobacteria and I take resistant starch (Red Mills Unmodified Potato Starch) every day, just a teaspoonful as I'm still working up to higher doses.
I wasn't sure what the resistant starch was doing till I ran out and didn't take it for a fortnight. Suddenly I was weaker, with loose sloppy stools, yelling at my loved ones like a maniac and generally all around unhappy and angry. Needless to say, within 5 days of being back on the RS, I'm back to happier, more energy, sleeping better and less brain fog. Resistant starch may have a great benefit for bifidobacteria, but I'm pretty sure it helps support my E. Coli too, probably by supporting a healthier better-balanced microbiome.
Hope my experience with foods helps you to manage yours, Santino.