depression due to gasses and constipation

i have severe gasses problem and some times constipation
every day early morning i used to pass 3 to 4 times stools. but still some time not satisfied
but whether my stools are regular r not gasses are comming out thru anus
some doctors sugested me to use “mebeverine HCL” with silicon dioxide 2mg/simethicone 40mg
but still no cure
please help me with some remedies
i always avoid milk and its products, also apple, banana, cheese, lot of other things which is making me sick due to gasses
thank you