Hello Veke, welcome to the forum
This game is not that hard once you know what you are doing. You can rest, you need to press the . (yes, the full stop)
However, if you think this will heal you, it will not. You need to pick up medpacks and use them, or pick up the health globes.
Now, since you die in level 2 i reckon you enter that level with low health allready and the shotgun and pistol. What you should do on level 2 before anything else is scouting around for armor. This will help you survive. Also try to play very carefull if you have low health, don't rush into the rooms but open the door, check it out, if there's a lot of enemies just close the door and try another one first.
good luck!