Nightmare Man
(2007)

Ellen really is possessed by the demon from the mask, but the thing chasing her in the woods and killing those around her isn't the demon.

Her husband William has been cheating on her with several women and using Ellen's money to do so.  He hired somebody to wear the African mask and kill Ellen so he wouldn't lose her money by divorcing her.  Ellen's been able to keep the demon in check with her psychotropic meds, but she loses them in the woods while running away from the Nightmare Man.  The demon takes over and kills William and his hired killer.  Mia, the only survivor, finally manages to kill Ellen, but gets possessed.  She finds Ellen's pillbox and swallows her pills to keep the demon at bay.

In the final scene, she's in a padded cell in a strait jacket demanding her pills.  The psychiatrist says she's been doing so well they decided to take her off her meds to see what happens.  As the doctor leaves, the demon starts emerging from Mia.

Thanks Tessa!