It would be hard to say that the food choices caused a massive internal bacterial infection severe enough to kill him, but immune systems do have a monumental task to uphold....so if his was compromised by diet and/or otherwise (i.e. midnight damsel attacks are not out of the question), anything can really happen.
That said, pellets and more pellets along with some dry seaweed is not a great booster diet after being brought home to a new tank.
Use fish oil to soak those dry foods every time, and if possible use dry foods less than whatever whole-frozen critters you choose to feed. Whole-frozen mysis are good, but anything similar too. DIY foods like whole-intact shrimp or clams work too. Not cleaned, deveined or cooked, irradiated, etc. Even processed into chunks or pieces is not as good. (
@Paul B shows how he prepares clams in post
#412 of his "discussion on immunity" thread. You can look up his design for his blackworm keeper too, or read about it in his book.)
If you can find a way, squeeze some kind of live food into their diet as well.
Live blackworms are popular becuase they are easy to order online if your LFS won't order them for you (maybe they already carry them, so ask!) and they are easy to care for at home. Oh and pretty much all fish appear to love them.
