Coming from a veterinary background, I can honestly say that you've done this last thing for your friend to show that you care. You've ended any suffering and removed any pain and I'mn sure that he appreciated it, especially as you were there for/with him as he closed his eyes.
All the best to you and your family at this sad time,
JJ.