Use some proper medication if your fish is ill. Melafix and Pimafix won't do anything at this state. Just look whether your fish has fungus or frayed fins, and get either anti-fungal or -bacterial medication that will actually deal with the bacteria!
During treatment, you should test the water daily, and change about half anytime you notice something being below/above accepted levels. Perfect water quality is crucial for your fish to survive at this state. You also need to feed him a varied and nutritious diet while it's sick! Feed lots of live foods, frozen or freeze-dried along with some fruits and veggies

Vitamin rich food is a big plus!!
Keep treating until the symptoms disappear and your fish starts acting like normal again.
You should also avoid buying any new fish for your orb now, it's perfectly stocked with one fantail living in it
