In my limited experience:
If they go inert a few days before and then die, it might be water pollution from overfeeding.
Solution: feed less, change the water
If they are lying on the side twitching, it might be poisoning of some kind from something you put in recently
Solution : Prime, water change, activated carbon
Symptoms of bacterial infection are pinkness of internal bits, and loss of appendages, antennae, etc
Solution : water change, h2o2 treatment, antibiotics, etc
To test for copper, u need the Hanna ultra low range test kit, which can measure parts per billion.