Thanks for query,
it seems that you might have hyper active thyroid.
Go for thyroid function tests
At present gym or stranious exercise is not advisable as it give more wasting of calories and now you require more calories to create positive balance for gaining weight.
Take high protein diet and more fat and more carbohydrate
Take Ciplactine to stimulate appetite.
Take protein powder and multi vitamin supplements.
ok and bye.