M.H.
It might be a dairy allergy. I would cut out your dairy intake for 4 weeks and see it that makes a difference. And alot of children with dairy issues also have soy allergy as well.
As for gas, onions, apricots, eggs, beans, apples as well as the foods that you mentioned already.
And you might look into finding a good probiotic for you to take and see if that eliminates some of your issues.