However, Bethesda has ensured that this scenario will never occur by making Dogmeat, as well as the rest of your Fallout 4 companions, completely unable to be killed. 

Instead, what will happen is likely similar to what happened to essential NPCs in other Bethesda games such as Skyrim. If your companion’s health is reduced to zero, they will fall down and look injured as you progress through the rest of your fight, and then they will get back up at the end.

Todd Howard also mentioned that if Dogmeat becomes injured, the player can jam a stimpak into him, and he will rise back up and continue to help the player fight. We are not sure how the player will heal robotic companions, such as Mr. Handy, but we know that just as with Dogmeat, he cannot be killed.

While this is reassuring to some players who are deathly afraid of losing their trusted companions and saves them the trouble of reloading hundreds of save games to make their companion survive, some players feel that this will make the game too easy. There is no incentive to be more cautious to protect your friends. Companions do not feel as special if you know with certainty that they will always be there and can never be taken away.

However, at least on the PC version, players can always access the console and set an NPC to nonessential, if Bethesda follows their current trend.