The Denzel that got blown up was the Denzel from the future that went back in time to save the girl. The Denzel that showed up at the end was the Denzel of the past that the Denzel who got killed went back into. We went from the current at the start, to the past, as soon as Denzel went into the time machine. Does that make sense? It has been a little while since I saw it.
Good film though, I like Denzel Washington films too.
If you haven't already, check out a classic from a few years ago, 'Twelve Monkey's' with Bruce Willis for an interesting time travel film!