To perform a melee attack, press . You will learn this attack early on in the game and if you want, you can even level up the power "fitness" which helps with melee damage. Holding will give you a heavy attack. The most useful melee attack will be when you are in cover and an enemy is on the other side of the barrier . In most cases, if you hold when there is an indicating arrow, you will do an instant kill. I found the easiest enemies to kill were the Husks. They also only melee, and there are always plenty of them when they attack.
Note: Even after dying, the ones you have obtained count. They count across all playthroughs as well as multiplayer (which you can play by yourself).