If you have Coeliac disease (gluten intolerance) you can get certain foods on prescription I believe, ask your GP, I presume you have been tested?
I was tested twice as the doc was so sure but definitely didnt have a gluten intolerance, I think it might be lactose intolerance. Sometimes similar symptoms.
Thanks again I have been to a consultant and was told I was wheat intolerant. For the past seven months I have been to the best of my knowledge wheat free and this did make a dramatic difference but occasionally I have set backs and the only thing I can think of that might be upsetting my head and stomach is soya
try eliminating it and see if it subsides and try to find out more info on it, if you have a good health store nearby they are great with dietary advice I have found