Hi, Welcome to Health care magic forum.
As you describe, you are definitely under weight, for your height, any how, you can gain weight, medically.
I advise you to consult a physician for diagnosis and treatment.
I usually prescribe to my patient with such symptoms injection of
anabolic steroid, periodically, protein supplement like endura mass or some thing else, multivitamins, and enzymes.
Take more of green leafy vegetables, pulses, sprouts, and protein rich foods,to have good health.
Wishing for a quick and complete recovery. Thank you.