It's fair to say that Holmes isn't exactly all cut up over Dr. Roylott's death. He knows just what kind of a nasty, thieving, murderous brute of a man he really was.
One night, Holmes and Dr. Watson cautiously enter Miss Stoner's bedroom at Stoke Moran, where they hope to get to the bottom of the mystery once and for all. After the two men wait in the darkness for what seems like an eternity, Watson suddenly notices a light emanating from the ventilator. The light quickly goes out, but then there's a strong smell of burning oil and heated metal. It's clear that someone in the next room has just lit up a lantern.
Not long afterwards, a snake slithers through the ventilator, causing Holmes to start up at once and attack it with his cane. This drives the snake back through the ventilator and into the next room, where it attacks and kills its master, none other than Dr. Roylott himself. He had used the snake to kill Julia, and would've done the same to his sister Helen had Holmes not saved the day.
At the very end of the story, Holmes casually acknowledges that he was indirectly responsible for Dr. Roylott's death. But he won't lose any sleep over it. Or, as Holmes puts it:
I cannot say that it is likely to weigh very heavily upon my conscience.