Determining which diode I need
Likely any diode will work -- the diode is used to read the keyboard from an MCU.

Most common diodes like that are 1N914, or 1N4148. A 1N4001 (or 4002, 4003.. 4007) would probably also work.

How did it fail ? How do you know it is failed ? Did you unsolder one end and check it is bad ?