The snake was 2 years old and starved. It fit in the palm of your hand and has spent its life slowly dying. If it was neglected as you said, it was probably also dehydrated from the inside out over that time, permanently stressed out, and falling to pieces.
You did not kill that snake, it merely died in your care. At least the end of its life was closer to how it should have been, so it could have some semblance of joy before it went. I'm sorry for your loss, but don't beat yourself up over someone else's negligence.