Your crab is not dead! Its not uncommon for crabs to lose a claw or leg between moults, once it still has one claw it will be fine and will grow a replacement. It may not appear at the next moult but will almost certainly be replaced by the second moult after losing the limb.
You can tell a crab is about to moult by a white line that appears across the very back 'hinge' of the body (carapace). Before that you may see a balloon like stump where the missing limb was which is the new limb growing.