Deja Vu
(2006)

ATF Agent Doug Carlin (Denzel Washington) decides to use the government's secret surveillance equipment to send himself back in time to save Clair Kuchever (Paula Patton) and stop the bombing of the New Orleans ferry.

He successfully travels back in time (becoming, for the sake of clarity, "Doug from the Future") and catches up to Carroll Oerstadt (Jim Caviezel) before he can kill Claire. Doug from the Future and Claire follow Carroll to the ferry, and set up a way to catch him before he detonates the bomb. But Carroll realizes he's been found out and goes on a shooting rampage aboard the ferry. Doug and Claire kill Caroll and drive the SUV with the bomb off the ferry and into the river before it explodes. Claire escapes the vehicle without injury, but Doug from the Future is killed when the bomb in the SUV detonates.

As Claire sits on the dock mourning Doug from the Future's sacrifice, Present Time Doug walks up to her to begin his investigation of the possible crime. She is relieved, and tells Present Time Doug that they had met before, but Present Time Doug doesn't remember meeting her, and prepares to hear her story.

Thanks Sundance!