Sorry to hear about your betta
He probably was sick when you got him, if he died so fast.
I have read that Melafix irritates the labyrinth organ like a noxious gas irritates our lungs. I used Melafix on my first betta and he seemed agitated. After another dose, he dropped like a rock to the bottom of the bowl. I have read of instances where others had my experience, and a few who didn't. IMO
, there are better meds for bettas, although from everything I read it's a great med for other fish. Just be aware that, when you're giving any type of medicine, you should watch out for stress in the fish.
I even noticed that one of my bettas fell to the bottom of the tank after I dosed some plant fertilizers, and I made a slight change in how I dosed. The fertilizer made a bit of an oily sheen on the water's surface, like the Melafix did.