Fatal Attraction
(1987)

It appears Dan (Michael Douglas) had finally gotten rid of Alex (Glenn Close) and he could take care of his wife Beth (Anne Archer). Unfortunately for them,  Alex unexpectedly reappears, wielding a kitchen knife, to terrorize and try to kill Beth as she prepared to take a bath.  Beth tries to defend herself and screams for Dan.  At first, he can't hear her from the kitchen, but then, when he does, he rushes upstairs and fends off Alex, while Beth runs to another room.

After a long struggle, Dan drowns Alex in the bathtub and she lies in the bottom of it, lifeless... apparently.  Then, she suddenly emerges, knife in hand, only to be knocked down by Beth, who fires a single shot in her chest, killing her for real this time.

As the film ends, Dan is seen talking to the Police and then re-entering his home, where Beth waits for him.  We see a close-up of a family picture of Dan, Beth and their child.

Thanks Julio!