Thanks for giving a detailed history.
First of all, do not make hurry in gaining weight.
of the body functions at its normal rate & any measures taken to hasten up this process can be harmful.
Most of the weight gain supplements are prepared from herbal ingredients & do not have any side effects if taken in the optimum dose.
But, before choosing any such health supplement, it is advisable to consult your family physician once.
Also make sure they do not contain steroids
...as intake of such a supplement will cause harm in the long run.
Moreover, you should not compromise on routine healthy food such as:
1. Consume more of natural diet like fresh fruits, green vegetables, milk, eggs, wheat, etc.
2. Avoid oily and junk food.
3. Stay away from smoking & alcohol.
Despite these measures, if you experience difficulty, it will be better to rule other causes of underweight
Investigations like complete blood count
profile, estimation of blood sugar level will be helpful.
Wishing you a healthy life.