Further to Johns post above..
the current comes out of the battery, thru the fuse box, up to the light blulb then down to the switch....then as John says the switch competes the circuit to ground.
It doesn’t matter whether the emergency brake is depressed or not.
For it to get hot it needs current to go thru it....
does it get hot with the light off also?
Somewhere in the circuit you have a partial short or a connection that is bad and has a resistance across it in , increasing the current over and above what is being drawn by the bulb
If you inspect the bulb, very close, does it have any discoluring on the inside of the glass, a faint 'silvering'.
This is a classic sign of more current being forced thru the light bulb (due to a bad connection in the circuit) this current slowly vapourises the filiment desposting the super hot tungstein on the inner glass....
Brake and tail lights are more prone to this.
The bad connection is usually a bad ground or dirty connection inside the swtch in your case.