There are two main ways mental health issues intersect with criminal prosecutions: 1. competency to stand trial and 2. insanity defenses. Here is an overview of …

source