Okay first off, melafix (or even battafix, some might argue) is a no-no for anabantanoidine (air-breathing) fish such as bettas and gouramis. The tea tree oil does a number on their labyrinth organ, which is what they use to breathe air.
Second, it is always best to avoid medications if at all possible. Every med you put in the tank saps oxygen from the water and has side effects that may stress the fish. For example, slime-coat stimulating products irritate the fish's skin to make it produce more mucous. So my rule of thumb is only to resort to meds if
a) The fish has a parasite, which won't go away with warm, clean water and aquarium salt
b) The fish has a disease in which warm, clean water and aquarium salt have not helped enough
For everything else, I just use warm, clean water and aquarium salt.
Your hospital tank is cloudy because it isn't cycled. Squeeze some filter drippings from the main tank into the QT filter and it should clear up within a day.