This came out in maybe the late '90s or early 2000s. A young doctor goes to work in an insane asylum and meets an attractive young nurse. Strange things are happening at the asylum, and the doctor meets a patient who's kept in an isolated room. The guy hides in the shadows. This patient seems to know all the secrets of what's going on.
In the end, the doctor realizes there is no man in the room, and the doctor is the one that's insane. He goes on a bit of a rampage, killing the young nurse.
I've been meaning to pick this up on DVD forever, so long in fact that now I've completely forgotten the name of it!