The initial symptoms - flashing and rubbing - sound like external parasites like flukes, which can cause swollen gills if they are gill flukes. But the treatment you are using, malachite green and formalin, should take care of those. This leads me to think that there is something else going on.
Do you think you can test your tap water? It would really help if we knew what your pH and hardness were right from the tap.
Also, do you use a water conditioner that detoxifies heavy metals?
Per the bloating - I might be missing something but the bloating could be related to his diet. Tetra food products contain a great deal of undigestable filler products that can cause bloating and indigestion problems. I would recommend switching to a high quality pellet that has fish products as its first and second ingredients. Avoid foods that have wheat products listed first or second on the ingredient list. Good foods to try are Omega One and New Life Spectrum.
I think Callistra's concern with you aging the water is that, while you wait for it to sit, your little fellow sits in a cooling container. If you want to age your water, it's best to pre-age it. Fill a big bucket with water, dechlorinate it, and add a heater. Let it sit overnight. Then it is ready for use. Otherwise, you don't really need to age it. Gas bubble disease is pretty rare in bettas and even if he does get a bubble, it will dissipate on its own.