Oh you're not a failure. You pestered the GP, despite having PND, and even changed GP so you could get him the help he needed. That's very far from being a failure. That's success beyond measure.
You have lots of sympathy here. I could have written your post when DS2 was your son's age. He was very sickly, very underweight, diagnosed with FTT (such a hideous term for undiagnosed eating problems!) along with a host of other pretty grim illnesses.
You ARE keeping him healthy - as healthy as he can be, for now. He may not be plump but he has you looking out for him and making sure the medics don't dismiss him. You will look back one day and see what you are doing from a distance and feel proud. I do, now that my son is really healthy and strapping, with a massive appetite.
Here's what I did with DS 2, in case it helps:
Made a list of all the food he seemed to genuinely like, and checked there was something from each main category (carbs, protein, fruit and veg.)
Gave him the highest calorie favourite foods as often as possible and the lowest calorie ones in between. (So he ate lots more bananas than cucumber, for example!)
I stopped worrying at all if he didn't have variety, so long as he ate from each food group. He lived on the exact same 5 items in his packed lunch without any variation for five years before asking for a change. He suddenly got bored and became more adventurous.
I did all the things you're not supposed to do, as it encourages bad habits - I'd let him graze while watching tv, or playing a game. Looking back, I think it was absolutely necessary as he had sever FTT and was off the centiles.
When he didn't eat, I oculdn't eat. We were all skinny and barking. I had to learn to eat with real visible pleasure in front of him, even if he refused to. So we did a lot of baking cakes (with loads of eggs and milk and almond flour in, to build him up). I got fat and he eventually got plumper!
It took a long, long time.
Take worry and coaxing out of the equation if you can. As long as he has high calorie bites from each food group a few times a day, he'll live. In time, I bet you, he'll thrive.