Three deaths are associated with Mersault: the death of his mother at the opening of the novel, the death of the Arab on the beach and Mersault's own death.
While we may argue that the death of Mersault's mother is ultimately the cause of the other two deaths mentioned (with grief leading Mersault to psychological instability then murder and finally to the death sentence for Mersault), we may also argue a contrary point.
Mersault himself denies the connection between his mother's death and the murder he commits on the beach.
Maintaining a complete disconnection between the first two deaths renders the last death "absurd", an event without understandable or underlying meaning. If Mersault killed the man on the beach for no reason, then there is no "reason" for him to be killed as punishment.
He is not an angry or insane murderer, in that case, not a grieving and unstable person, but instead must be seen as a mechanism subject to the whims of consciousness - a human machine responding to input and acting without a meaningful pattern of behavior; "reacting" instead of "acting".
Many readers like to side with the people who try to convince Mersault that he is in fact grieving while he sits in jail awaiting trial.
This reading of his character provides a semblance of meaning to his actions and his attitudes. Mersault, however, resists this interpretation of his character. He does not necessarily believe that a meaningful interpretation of human actions exists.
Meursault recognizes the “truth” that life is meaningless.
He does not feel the temptation to encumber his reasoning with considerations or dogmas.
Death, for Mersault, is simply an inevitable part of life, not to be explained beyond its factual nature. His mother dies and he goes to the funeral. A man shines light in his eyes, so he uses a gun to shoot the man. These are matter-of-fact responses to matter-of-fact situations according to Mersault.
Ultimately, Mersault is able to speak for himself and to choose also not so speak. He is convicted of murder and put to death, in part, because he refuses to conform to a view of himself that others project onto him. His truth, as cited above, is quite different than the truth of the magistrate and the priest.
Meursault dies because he knows this truth—he is killed because the others cling to their illusions.
This third death brings an end to the novel and offers a third type of death. Where the first death was natural and the second was criminal, this third death is (perhaps ironically) a death imposed by the justice system, based on judgement (but to Mersault's thinking, not based on reason).