The hood switch has nothing to do with the engine compartment lamp.
The hood switch is for the anti-theft function only.
The engine compartment lamp has two switches - both integrated into the lamp assembly itself. One switch is a mercury tilt switch and the other is a manual override slide switch. You may use the manual slide switch to turn off the lamp when the hood is up for extended periods. Of course the tilt switch turns the lamp on when the hood is up and turns the lamp off when the hood is down.
The hood switch is a spring loaded momentary normally closed switch to ground if I remember correctly. If the hood is opened with the alarm armed, the switch puts a ground signal to the anti-theft module and the alarm will go off. If this is correct, you can just unplug the harness at the switch. If I am wrong, you will need to short across the unplugged harness.
Bottom line - you can disable the malfunctioning switch until you get a replacement. Of course, without the switch the hood being jacked open during a theft will not set off the alarm.
:L