This may be re-stating the obvious, but when your fish are fed, pollution is added to the fishes' water directly in the form of the fish food, and indirectly in the form of fish poop caused by the fish feeding. That added pollution may be what is causing your fish to gasp after they have been fed.
Sadly, it often seems that gasping fish become dead fish unless some action is taken by the fish keeper. Please consider doing at least 25% PWCs (Partial Water Changes) every few hours or at least twice a day (morning and evening) until the fish stop gasping, and then continue the PWCs until the fish no longer gasp after being fed. And then do a few PWCs after that point just to be safe.
I know all those PWC can be a lot of work, but it will be worth it when your fish are happy and healthy again.