Having to switch to your bomb and then manually droping it is inefficient, so it's definitely worth setting up a drop bomb bind. With this bind, pressing the B key will instantly switch to the C4, drop it on the ground, and then switch back to your primary weapon.
By default this command is bound to the B key - meaning when you press the B key you will instantly drop the bomb. Press the "Change Key" button to select a key to bind this to. Copy and paste the below console command into your developer console or autoexec to apply this bind.
Currently bound to: B
The first part of this command, "bind b", tells the game which key to bind the command that follows to. In this case, the key is B, but "bind c" would bind to the C key, "bind d" to the D key, etc.The second part of this command is a list of commands, separated by semi colons, that should be ran when the binded key is pressed. This list of commands needs to be in quotes so that the game knows that it should bind them all, and not just the first one.
The first command in the list of commands is "use weapon_knife;", this part isn't required for the bind to work, but we first switch to the knife so that if you do not have the bomb equipped, your primary weapon will not be dropped (as you can't drop your knife).
The next command "use weapon_c4;" is quite straight forward: it switches to the C4.
The third command, "drop" will drop what is in your hands (as you've just switched to the C4, this will be the C4". Then, we switch back to slot1 with the "slot1" command so that you can resume playing with your primary weapon.
Find different variations of this bind below.
If you'd like to also alert your teammates that you have dropped the bomb, the below bind will also send the message "I HAVE DROPPED THE BOMB" in team chat. Copy and paste this into your console or autoexec to apply.