Is it dangerous to short circuit D1 on STM32F4 Discovery Kit?
Looking at the schematic on page 27 of the manual, D1’s function is to prevent the external 5V power input from back-feeding the +5V from the USB.

With this shorted out, you should not have both the USB and the external power connected at the same time.

If you want to replace it, use a Schottky diode. The original is rated for 10 volts, 3 amps. You can use one rated for that voltage or higher and, to be safe, at least 2 amps.