Your poor betta has had it rough and as a result he isn't looking too good. He has been through a big ordeal but the fact that he is still alive is definaltely something. Give him time to recover. If he is uninterested in his usual food try offering something extra nice like frozen black mosquito larvae or frozen brine shrimp to encourage him. Just be sure to rinse thoroughly before feeding them to him and just drop one at a time into his tank, this will give him time to try to eat it before it sinks to the ground at which point he may become uninterested in it. Be sure to remove any uneaten food afterwards to avoid polluting his tank.
Even though it is not ideal bettas can survive quite some time without eating (a month or two in fact) so do not get disheartened if he does not eat straight away just keep offering food to him daily and in the end he should recover fully.
Good luck with your little guy, I hope he is doing much better soon