If you want to mitigate the risk of deliberate suicide in a cockpit, you should limit the number of people in it
That's one way I suppose or perhaps a caring employer could actually take mental health seriously. Say, a protocol that allows easy and discrete access to mental health care for those that might need it. Train managers of critical function employees (eg pilots) to recognise and respond to concerns over a mental health issue. I recall the only response from TCAS to the German Wings suicide/homicide was to inform pilots that antidepressants are now on the list of drugs that will lose you your job...