Don't do dangerous things while low on HP.
Examples of dangerous things:
- Use-IDing scrolls, if it's possible it might be summon monsters or aggravate monsters. (I hope you always read unknown scrolls in a corridor or next to a staircase!)
- Use-IDing potions, if it's possible it might be a 'bad' potion. All of the bad potions except for darkness can make your life horrible very quickly. (Speaking of potions, always quaff-test next to the downstairs, so if it's descent your life isn't in danger.)
- Going to where you know tough monsters are, if you lack a quick-neutralize staff (obstruction, entrancement).
- Going to where tough monsters might be, if you lack a quick-neutralize staff.
- Spending any more than 1 turn in a room which has sleeping OOD monsters (the sooner you leave, the better your chances are that they'll stay asleep)
You might think that it's a waste of nutrition to retreat to a safer higher depth and heal, but unlike all other lifesaving consumables like potions of healing and scrolls of teleportation, food is guaranteed. It's much better to use food than emergency resources - and if you find you're burning through your food so fast that you have to dive dangerously for more, perhaps you're taking too many risks to begin with, or need to use your scrolls of enchantment more wisely. Sometimes death is unavoidable (e.g. D:2 vampire bats with no identified resources), but you can make it far less likely by following the golden rule.