The mind processes information as connections and separations in space and time, first into objects “here and now” (id, sensory level), then into entities “there and then” (ego, cognitive level) and then into groupings “everywhere and always” (superego, executive level). Because the superego derives from the ego and the ego from the id, the superego can’t make decisions against the ego nor the ego against the id, so that on trying to do so, failing to do so can cause a loss of sense of self.
The mind identifies (with) things/persons based on their separation from other things/persons, and desires them based on their connection within itself (both take place on all levels, id, ego and superego). Because our self is what’s most often involved in the information we process, we make the most connections/separations with/from ourselves. Therefore, we primarily desire/identify with our own existence (through the id), secondarily what’s connected to our own existence, such as friends (through the ego), and tertiarily, what connects that which is connected to ourselves, such as beliefs (through the superego).
A lack of sense of connection/separation causes mental illness. Too little connection causes “negative symptoms” such as autistic, depressive and antisocial, too little separation causes “positive symptoms” such as psychotic, manic and narcissistic, based on whether the lack of separation/connection occurs in the sensory (id), cognitive (ego) or executive level (superego), respectively. Because the analysis of reason is based on separation and the holism of intuition on connection, too much analysis will cause the former and too much holism the latter.
Our sense of connection and separation between things/persons are entirely contained in our information about them, if that information is no longer processed it causes a loss of sense of connection and separation, which is why mental illness can be caused by stress, either as the loss of something we felt connected to or made us feel separate. The most extreme case of this is near-death experiences, during which a sudden loss of self leads to ego disintegration much as that seen in psychedelic experience.