I'm so sorry, I hope your little guy is feeling better soon! Have you tried an epsom salt treatment? I know you said he hasn't been eating, but if he is constipated, that might help. Also, epsom salt seems to be a conservative treatment for many things, so I'm 99% sure it can't hurt to give it a try. The dosage that was recommended to me was 1 tsp. per gallon. Make sure you dissolve it completely in a bit of water (tank water) before you add it into the tank with him.
I had a similar problem with my first betta, although it wasn't nearly so drawn out like this is. Mine didn't make it, but your little guy sounds like one heck of a fighter! I really hope he's feeling better soon. PM OldFishLady, she is an amazing help. :)