I'm sorry to hear that If your fish's body was entirely swollen, it could have been Dropsy. Recently, one of my neons died. It also had its entire body extremely swollen. It had Dropsy. The disease kills extremely fast and fish suffers greatly because of it. My neon lived only 2 days after its body got swollen :'( It looked horrifying.
That was the strange thing...I don't think it was dropsy as only his belly was swollen, and not as bad as dropsy is. He just looked fat, but one side was bigger than the other. No pinecone shape, no difficulty swimming, just bloated, secluded in his hiding spot, hairlike white poop and not eating. I tried the pea trick and Epsom salts thinking it might be constipation, but it didn't help. :'(