The only way to gain weight is to eat more calories than you burn over a period of time, if you are only eating 2 meals a day I doubt you are even eating enough calories to maintain your current weight, hence why you lost more. To start with try to eat breakfast, lunch and an evening meal everyday. After a few weeks of getting used to that try to add snacks inbetween meals, and/or slowly increase the amount of food you eat for each meal.
Your doctor may be able to help you but would likely just refer you to a nutritionist so you could just seek out the help of 1 of those and skip going to the doctors.
If you still don;'t gain weight after trying the above then seek the doctors advise as you could have an underlying medical issue.