I'm an emergency department nurse, it's not something I throw around but I can tell you we may put a brave face on thing, but it doesn't mean on the inside we don't struggle with what we've seen, and done/not done.
Like many of the other members have said the first rule of CPR and responding to a scene is your own safety first. If you, or the person with you had fallen you'd have been no use to the person at all.
You must try to stop with the 'what ifs' you can't change what you did and from what I've read you couldn't have done anything more. We're always told in training to not even start CPR if we don't think we'll get help to us, because it's absolutely exhausting and on minuscule amount of out of hospital resuscitation attempts actually get the person back alive (the survival rate for cardiac arrests in general are 2-12%, let alone those from trauma). And unlike portrayed in tv shows and films very few people are in the type of cardiac arrest where it can be shocked with the defibrillator, so CPR was exactly the correct course of action.
Don't worry about initially freezing, and feeling like you were flapping - you did what you could, and try and take some comfort in the man didn't die alone. I'd hate to think of any of my loved ones dying alone, and I can guarantee his family, if they've been informed you were there, will be very thankful you were there.
The vision will be harder to stop, and the smells. I'm glad you went back to the place and faced it. It can't have been easy, and it would have got harder over time. I can only suggest that in time if things haven't settled you speak to someone. Are you in touch with the person that was there, because they would be an ideal person to talk to it about - no one will be close to what you're feeling but the person you shared it with.
You'll never forget what happened, but take solace in the fact you actually responded - some people wouldn't, you tried your hardest, and the man didn't die alone.