The company I worked for was one of the first to implement the two on the flight deck policy soon after the armoured doors were fitted. The policy at the time had nothing to do with the mental health of the lone crew member on the flight deck. It was implemented purely for the reason that if anything happened to this crew member whilst alone there was no possible way to access the flight deck. The door could only be opened from the flight deck side if closed and locked by one of two methods.