I volunteer at a wildlife rehabilitation center, so I've seen quite a few animals die. It was hard the first time it happened - a lady had brought in a cardinal that flew into her car's windshield, and the little guy took his last gasp and died in my hands as we were looking him over. As others have said, you get used to it. It's never easy, but you learn how to deal.
However, it was a completely different situation when I had to have my old cat put down last year (he was diabetic, and the complications had gotten to be too much for him). I stayed in the room with him, but it was one of the hardest things I've ever done.