Gothika

After a car crash, a criminal psychologist regains consciousness only to find that she's a patient in the same mental institution that currently employs her. It seems she's been accused of murdering her husband—but she has no memory of committing the crime. As she tries to regain her memory and convince her co-workers of her innocence, a vengeful spirit uses her as an earthly pawn, which further convinces everyone of her guilt.
Because someone is dead doesn't mean they're gone.