You should really acclimate them for at least 15 minutes, also you should add a few tablespoons of YOUR water into the water in the bag so they get used to any differences in
pH or other parameters. Adding them after only 5 minutes and not putting any of your water into the bag for them to get used to means that they potentially go into shock when you release them into your tank, which is probably why the one died. You also should NEVER put water from the bag they come in into your tank, it could possibly have parasites or other harmful things in it that youre putting in your tank! Gasping for air means they are sitting at the top of the water with their mouth opening and closing (looks similar to when they eat food from the surface)