The most humane thing to do first is to try and help it recover. You should start setting up a QT ASAP and get him in there so you can try some treatments.
LFS said internal parasites. Up until yesterday eating well but losing weight. Water is good 0 nitrates, 0 phosphates, 0 am. kh 160, ca 380. No treatments, fish is lying back corner behind rock, hard to even see.
When I first got my blue tang (6"), she would hide and "play dead" like that, too. I have a 135 gallon with just a little live rock (more curing right now) and a white artificial coral tree looking thing.
At any rate, she'd hide & pant and looked like she would float all the way to the top of the tank if she didn't park herself under one of the rock platforms. I fed her a peeled frozen (thawed) pea soaked in garlic. At first she wouldn't eat anything; much less a pea. Once I soaked it in Garlic X-treme, it took her a bit, but she gobbled it down. Now she is happy and healthy as can be. Strangely enough though, she sleeps in the coral "tree"... I named her Birdie. I hope yours pulls through.