Hi ! Good morning. I am Dr Shareef answering your qurey.
On the gas formation issue, I would suggest to avoid any kind of food from outside though which some kind of intestinal infection might creep into your intestines producing more of gases. This digestive symptoms might be rendering you more anxious so much so that the anxeity might be transforming into the present apparent feeling of swaying of your body over your legs which is nothing impossible.
If I were your doctor, I would go for a routine stool test
for ova and cyst
followed by appropriate treatment of any infection especially if it is an amebic one, which might cure it completely. In the mean time, you may go for a proton pump
inhibitor drug combined with a prokinetic drug which will maintain the health of your stomach. I would also not hesitate to add a dose of alprazolam at bed time into your schedule.
If these measures do not help you out, then I would refer you to a neurologist
for investigations and management.
I hope this information would help you in discussing with your family physician/treating doctor in further management of your problem. Please do not hesitate to ask in case of any further doubts.
Thanks for choosing health care magic to clear doubts on your health problems. Wishing you an early recovery. Dr Shareef