There is nothing that prepares the average person who does not work in law enforcement, the fire services, the military and/or as an EMT/paramedic first responder/in the medical field to see something like that. Even then, there is an emotional wall that is built around those moments to keep doing the job, because normal people recognize that for the life-changing event it is for any regular, empathetic human being. An entire cadre of understanding support often exists among brothers and sisters to lean on as well - it's not easy at all, even if you do this kind of work every day.
I have seen people die (quite recently at that), and I have seen people dead in horrible ways. Nothing makes the realization you are witnessing the end of a real human life any less heart-wrenchingly profound or, in some ways, terrifying. For whatever it is worth Slammified, I can almost guarantee there was nothing you could have done for the man you saw. Even if you had done "something" - whatever that might have been - there is nothing to say you would not have made his injuries or pain even worse accidentally, even with the very best and most noble intentions.
I would tell you not to be so hard on yourself but feelings are what feelings are, and you may as well tell water to just get itself together and flow uphill for all the likelihood you can simply "turn off" emotions. Still, you should know that as someone who has seen a lot of death, there is no judgment for what you did from here at the very least. All I will ask is that you please be kind to yourself, and go gently with your soul. You called 911, you got people to the scene who actually could do something if there was anything at all that would have helped that man. You didn't drive or walk away and abandon him. You didn't ignore what you saw and wait for "someone else" to call for help. That right there is about a thousand times more than some witnesses/passers-by would ever do if they were in your position.