Oh no! That's awful! I don't think it's anything you did or could have done...I agree with the others that a necropsy would be a good idea, especially because if he died of something contagious you'd need to wait a while before replacing (and do a very thorough sanitizing) so that any other reptiles do not contract the same thing. What lousy luck, I'm so sorry...but I'm very suspicious that he was not healthy when you got him. Rest in peace little one... Any sort of guarantee from the seller? If you do a necropsy & find out it was something serious & contagious, you need to be talking w/ them.
(sorry I got here so late! I've been really busy with yard work today)