What is this movie?

I’m trying to think of a movie, it’s about this man who kills his wife. Everyone thinks he did it. And he did but doesn’t realize it till the end because he’s crazy.

It’s not Gone Girl or Secret Window.

Sorry that’s all I can think of. Thanks!
7 answers 7