Yes, you must apply all the damage--but you can still leave your target alive.
Except in the case of instant death: "when damage reduces [one] to 0 hit points and there is damage remaining, [one dies] if the remaining damage equals or exceeds [one's] hit point maximum." (PHB p.197)
Monsters and Death
Most DMs have a monster die the instant it drops to 0 hit points, rather than having it fall unconscious and make death saving throws....
Knocking a Creature Out
...When an attacker reduces a creature to 0 hit points with a melee attack, the attacker can knock the creature out. (PHB5 p.198)
Clearly any melee attack1 can be optionally declared incapacitating rather than lethal. However, the conclusion to draw from the earlier section is that even ranged attacks don't immediately kill a monster: you've got time to stabilize the goblin just as you would an ally. It's just that rarely anyone ever tracks it, and for ease of play we just leave a wide swath of assumed-dead opponents in our wake. (But you may not want to leave that wake: I suggest this as a way to keep your PCs from becoming a bunch of murderous cretins.)
1 - note that this includes melee spell attacks; clarification in November 2015 Sage Advice