Though I have been able to tell for a long time that certain foods have a negative effect on my mental function, I had no idea how much gluten was affecting me until recently. I stopped eating it due to similar advice some time ago and have only been eating gluten free bread and pasta. While I felt that it had helped, I had also been doing several other things to try to improve my autistic symptoms, so it was hard to say how much (plus, I find it difficult to compare how I feel now to how I felt before in terms of mental clarity because I can't retain a nebulous concept like that in my memory). However, yesterday I was in a cafe where they had no gluten free bread and figured it couldn't hurt to have a wholewheat bread sandwich. That was a mistake. Within about ten minutes of eating it it felt like a fog had descended over my brain and I struggled to think properly. It was very unpleasant and made me realise that gluten had been one of the main contributors to my difficulties (I'm still very far from NT without it, but it helps a lot). I feel better again today, but I'm not going to be eating wheat again.
I'm not sure if it helps in terms of my emotions/anxiety, I haven't really noticed that. Usually the effect of eating the "bad" food for me is brain fog and/or feeling very tired.
I am trying to do the same with dairy - have had no problem substituting milk and butter, in fact I even like the substitutes better in some cases. But I'm struggling with cheese. I absolutely love cheese and have yet to find any dairy-free cheese substitute which doesn't taste bad, or tastes nothing like cheese. Reducing my dairy intake does already seem to be helping though.