First off, your fish is ill. Its not the medication that is making it worse, no point blaming the medication. Its the progression of the illness that is making your fish worsen.
Bettas are labyrinthine fish, so they can get oxygen from surface. When stressed this is what they are likely to resort to. If you have turned off the filter oxygen will deplete, so again he will go to the surface for air.
Can you give more details on the tank please.
What are your tank parameters (ammonia, nitrites, nitrates, temp, pH)? Please give exact values.
How large is the tank? How long has the tank been set up?
What type of filtration are you using? Please give the name and number (i.e. Fluval 304) and amount of*gph
How many fish are in the tank? What kinds of fish are they and what are their current sizes?
When is the last time you did a water change and vacuum the gravel? How often do you do this? How much water do you remove at a time?
How long have you had the fish? If the fish is new, how did you acclimate it/them?
Have you added anything new to the tank--decor, new dechlorinator, new substrate, etc.?
What kind of food have you been feeding your fish, have you changed their diet recently?
In all honesty, if the fish isnt eating or able to swim its probably too late for treatment.