So sorry for your loss.

Like you said, maybe there was something underlying there that was affecting this snake... who knows. It sounds like you did what you could though, and it wasn't being neglected by you. It's hard with animals like this because they don't often show signs of anything until it has affected them to an extreme point.