I'm really sorry to hear it
Fish illnesses and injuries are tough to diagnose and treat. A lot of times in the wild they instinctively know that being weakened makes them prime targets for aggression and predation so their natural defense is to lay low, hide up, and pass up on the food for fear of exposing themselves, just going for what nibbles they can get while staying inconspicuous. Sadly in our home aquariums that too often means that they just get weaker and weaker because our tanks just can't provide the same kind of bounty.
You recognized that there was a problem and sought help so you did good! It's very important for us all to watch our fish, learn all we can about their natural behavior, and take immediate action if there's a problem. You did all you could for the lil guy and just remember that with everything you learned with this experience you'll be better prepared for your next fish!