Melee mode seems to switch from the new assassinate "hold B" mode to the "rapidly tap B" mode when several of those zombie dudes are in your face? What controls which action will occur when "B" is pressed?
There are only 3 ways to use melee attacks -- press (triggers regular melee attack, can be chained) or hold (heavy melee, class and race specific). A third is a grab, which requires you and your opponent to be on opposite sides of the same piece of cover.
Any other time you are prompted to use a melee attack (like when a husk is in your face) is because the enemy has latched onto you - they will continually do damage until you mash "attack" enough to get them off your face.