This is a special post for quick takes by koanchuk. Only they can create top-level comments. Comments here also appear on the Quick Takes page and All Posts page.
Suicide occupies a strange place in agent theory. It is the one goal whose attainment is not only impossible to observe, but whose attainment hinges on the impossibility of it being observed by the agent.
In some cases, this is resolved by a transfer of agency to the thing for whom the agent is in fact a sub-agent and is itself experiencing selective pressure, e.g. in the case of the beehive observing the altruistic suicide of an individual bee defending it. This behaviour disappears once the sub-agent experiences selective pressures that are independent from those of its parent process, and when acting as a sub-agent for it no longer confers it an advantage for survival and reproduction.
Looking at agents with greater cognitive power, the reason for the existence for this paradox is not so clear. It could be that all suicidal behaviour ultimately boils down to behaviours aimed at improving the fitness of the unit begetting/containing it (e.g. by freeing up resources for a community of agents), and the cases where this does not happen are basically overshoot-type glitches that are ultimately going to be selected against, or it could be due to hidden relations and mechanisms that improve the fitness of some other unit which the agent might not even be aware of, but for whom the agent is perhaps an unwitting sub-agent.
I think psychological parts (see Multiagent Models of Mind) have an analogy of apoptosis, and if someone's having such a bad time that their priors expect apoptosis is the norm, sometimes this misgeneralises to the whole individual or their self identity. It's an off target effect of a psychological subroutine which has a purpose; to reduce how much glitchy and damaged make the whole self have as a bad a time.