Remove the bodies assuming you haven't already done that.
Do a 75% water change and gravel clean the substrate now and every day for the next week.
Don't feed it for a few days and hope for the best.
------------------------
Don't feed goldfish to other fish because goldfish can be full of diseases like worms and TB, which are then transferred to the catfish. They can also have residual chemicals in them if they have been treated and the chemicals can build up in the catfish and kill it.
Use white bait, blue sardines and prawn/ shrimp as the main foods. Buy them from a fishing shop and keep them in the freezer. Take a few out and defrost them, cut them into small pieces and offer the fish a few bits at a time.
------------------------
The catfish should have a large hollow log or pvc pipe to sleep in. You can also add lots of plants to help it feel more secure.
Adding a picture to the back of the tank can help fish feel more secure. You can buy them from pet shops or use a plastic bin liner, some coloured card or even a newspaper. Just sticky tape them on the outside of the tank.