diodes are made of silicon, which have been enriched in phosphorus and boron to create the PN junction. Since the electrons are always going in the same direction, from N to P in the junction, I was wondering whether a diode had a given lifetime after which there is no electrons anymore to move in the PN junction (no deficiency nor excess in electrons in any side of the PN junction) ? Thanks!
The electrons which flow in a PN junction do not come from the device itself. Diodes (and other electrical components) are designed to work in a circuit. The circuit provides the electrons. Just as Georg said: your homes wiring does not supply elecrtons, it only carries them.
In the case of electro-optic devices, light energy can excite a device into a polarized state, where electrons prefer to flow in a certain direction (and thus develop a voltage). But if you do not provide a closed circuit loop in which the electrons can travel, you get no current.
Another way to think about it: IF you have an unbalance of charge, you unavoidably get an electric field built up. The field strengths per electron are relatively HUGE per electron (as compared to other forces, like gravity). Can you imagine the charge which would build up after running a theoretical device which could donate its electrons without replenishing them?
Standard PN junction diodes generally can well tolerate forward voltages, but are vulnerable to breakdown from backward voltage. Every diode has a characteristic "breakdown voltage", and when this is exceeded current will grow exponentially and physical destruction soon follows. (However, certain diodes like Zeners and avalanche diodes are designed to operate in the breakdown range).
When this destruction (avalanche breakdown) occurs, what happens is electron-hole pairs form and act as charge carriers, increasing the current, which in turn creates more electron-hole pairs, etc., until the current grows large enough to physically burn out the semiconductor. This destruction from the formation of electron-hole-pair charge carriers is probably the most common way diodes fail. Forward voltage would have to be extremely high to cause destruction of a standard PN junction diode and (other than lightning strike, etc.).
In addition to overvoltage, overcurrent also can cause destruction due to thermal runaway. The electrical resistance of silicon increases with temperature up to 160 °C, but then starts to decrease. So in regions of the diode that become overheated, more current flows, which in turn causes yet more heating, which leads to further resistance decrease. This "runaway" effect leads to current crowding which will indeed cause the dopants to migrate within the junction, eventually ruining the diode.
Electrostatic discharge (ESD) and transients like lightning strike or electromagnetic pulse (EMP) can also cause failure. But with a normal PN junction diode, they should be able to operate within the normal forward voltage range for a very very long time.