Under no circumstance should you cook and eat a dead crab! Not only because the texture and taste will be mushy and gross, but the moment a crab dies it releases ammonia and bacteria levels increase rapidly. You would be risking some serious food poisoning.