Apologies for not answering when you asked about epsom salts. My sister got married yesterday, so had a very busy day. The salt to use is aquarium salt or cooking salt.
Sorry to hear about your fish. When a fish gets to that point of laying bent over, it is almost certainly because internal organs are failing. There was probably little you could do. In the picture, the fish looks quite thin, which would back up the possibility inernal problems. I suggested the salt as this can help the fish to regulate its osmoregulation and prevent overworking the kidneys during periods of illness and stress. I used salt many years ago to help a goldfish that was bent over loke this. It worked on three occasions for the same fish, but eventually ne succumbed to whatever his problem was.