Seen lots of people die up close.
How do you deal with it? It depends on the situation. A peaceful death is something beautiful... You can hold their hand, reassure them. Make sure they understand that there's nothing to worry about if they're conscious, or just stand there and be there for the people saying goodbye if they're not. There's a dark moment as they pass; a strange mix of relief and grief, and then... It is over. You can be at ease about it, in a way.
Violent deaths are difficult, whether through actual violence, or through pain and spasm. I've never been present at a human death caused by intentional violence, such as that of a soldier or fighter, but I'm quite sure the experience is rather different than a violent death caused by an accident. Violent deaths (even caused by accidents) can leave quite a mark. There's the yelling, the roaring, the sobs, the screaming and the pleading, the scent of scat and blood... And there's nothing you can feasibly do while you wait for the drugs to kick in.