What was the ratio of males to females? You need at least 3 females for every male, because they are RELENTLESS breeders and will harass the females to death if there aren't enough.
Some males are incorrigible- I had a male that nipped at every female in the tank, chased the other males, and shredded the pectoral fin of a leopard danio to a bloody stump. I got rid of him, because as stunning as his colours and pattern was, I didn't want to breed from him in case I ended up with a tankful of 'piranhas' .
Dead fish will spike your ammonia, and at such a high ph it is more toxic than if you had a neutral ph.
Unless there is ich in the tank, I wouldn't set the heater above 26c. The hotter the water, the less oxygen it can hold.
All of those stressors may have combined and snowballed to the point you now find yourself at.
Also, how big is your tank, and what sort of filtration are you running?