From Valve Developer Community
buddha is a console command that ensures you never die by always forcing you to have at least 1 hp.
To enable and disable, type
buddha in the console. If it worked, it should say "Buddha Mode on/off..." in the console.
Bug: Rarely, this command will fail and let the player die.
god, a console command that makes you take no damage at all.