Reign Over Me
(2007)

Charlie Fineman (Adam Sandler) eventually breaks down and reveals to Dr. Johnson (Don Cheadle) that his family was killed during the 9/11 attacks. Charlie tries to commit suicide by cop by holding up a taxi driver, then an officer. The officers unlawfully beat him, so the state decides to drop the charges so it doesn't show on their record. However, he is sentenced to a three-day psyche evaluation. After this, the state presses for up to a year of more psyche evaluation. The judge leaves it up to his parents-in-law to decide because of the incompetence of the prosecutor. Charlie moves out of his apartment and into another, and his parents-in-law decide not to send him to the evaluation. At the end, Dr. Johnson calls his wife and apologizes for not talking to her more, then rides off to his own home on Charlie's scooter.

Thanks Salvatore!