You're describing Primal Fear (1996) — but with a role reversal:
Plot: Vail takes Stampler's case pro bono; discovers Stampler has dissociative identity disorder ("Roy"); courtroom twist; Norton's breakout role (Oscar nom).
Hopkins does not murder his wife in this film. If you recall a Hopkins wife-murder plot, it might be The Edge (1997, survival), Fracture (2007, shoots wife), or Hannibal (no wife).