Timecrimes
(2007)

Hector spots a naked girl in the woods near his house, and when he approaches her he his attacked by a man masked in bandages and takes refuge in a strange tank that turns out to be a time machine that travels back one hour.

After his trip he gets hurt and wraps his face in bandages, and ends up chasing his own self into the time machine. Soon after he spots the girl again he follows her to the roof of his house. When the girl falls off to her death, he sees her hair and realizes it's actually  his wife who fell.

He goes back in time once more, finds the girl who is chased by the man in bandages (himself), and brings her to his house. He hides his wife and tricks the girl into climbing on the roof after cutting her hair. The girl dies, Hector retrieves his wife and they sit side by side on lawnchairs while his bandaged self goes back to the time machine thinking his wife is dead.

Thanks Anthony L!