You have a conundrum there: How do you explain something to someone who may be unable to understand your explanation? That's like trying to explain to a drunk that he's too drunk to drive, when you get back, 'No, no, I'm fine. Just help me stand up...' All you can do is to take over, take away the keys, or in this case, lock the Captain out of the cockpit.
It's not as if there's some clear line. Let's hope we don't get some situation where the next FO locks out his Captain 'because he looked at me funny.'
You seem to see some ceremony where the Captain has to be read the Riot Act, stripped of his epaulettes and Ray-Bans and then drummed off the flight deck. Events move too fast for that. We train for 'subtle incapacitation,' for instance, when a crew member is fine one minute and out of it the next. For instance, you line up for takeoff, get cleared to depart, everything normal, but then you don't get the call for '80 knots.' The PNF is sat there, eyes open, looking fine, except for not reacting. Or perhaps it's the PF, who never rotates at 'Vr.' That is not the time to have a conversation such as, 'Are you feeling okay over there? Is there something you need to talk about?' You are about to merge with the scenery unless the PNF suddenly transforms himself into the PF, 'with the speed of a thousand startled gazelles.'
As far as I know, nobody trains for the PIC going ga-ga, as here. The FO was faced with a situation that is not in the book, when he seems to have done exactly the right thing. Imagine if he had somehow ended up locked out, with his Captain now alone on the flight deck. 'Open the pod bay doors, HAL.'
Of course there are already questions about why, when the Captain showed up late for the crew briefing, nobody realized that there was something wrong with him. Well, we operate on the basic assumption that people are 'normal,' ignoring slight oddities as just that. We don't think that someone showing up late means that they are going to flip out a few hours later at the controls of an airliner.
I am sure we will be told much more about that as the facts come out. Look forward to a few 'talking heads' telling us that we need a new system to ensure mental health, in the same way that we now test for drugs such as alcohol.
One consequence may be the end of that program where pilots tote guns in the cockpit, for fairly obvious reasons.