Security check
This is the reason that I always was irritated when we went through security control and you had to "undress" as pilots. We are in command of a lethal weapon, the airplane. But the commotion if you forgot your small penknife.. They better only check your licence that you are indeed a pilot.
These tragic events with mentally ill pilots can only be stopped when their mental problems are recognised by collegues, doctors, company before they reach the state that they become lost souls.... It is not easy and maybe not possible in some cultures to express your concerns about a colleague but it can save lives.