Oh no! I'm so sorry to hear that! The bloating was probably a sign of dropsy rather than a result of constipation. I have seen OldFishLady suggest an epsom salt treatment for dropsy, so I would continue to go ahead with that treatment, though sadly it is often too late by the time a fish starts pineconing.
But , though uncommon, it is not impossible for a fish to survive dropsy, so I would definitely do the epsom salts and hope for the best. Once the treatment period has ended, do frequent water changes and keep him as comfortable as possible. If the salts don't help, and it continues to get worse and he appears to be suffering, you may have to consider euthansia.