only in the PC version. you can use cheats to bring companions back.
On the other hand, after installing the Broken Steel downloadable content, you can get the "Puppies!" perk at a certain level, which will bring Dogmeat back after he dies. He will be waiting at Vault 101.