I am not too familiar with White's tree frogs in general but with other reptiles/amphibians, muscles spasms can be caused by not enough calcium or other nutrients in the diet. Since you didn't have him very long, it could have been a problem already set in when you bought him, especially if purchased from a petstore. My suggestion is to read up on White's Tree Frog caresheets online to get a better understanding on their care requirements (if you haven't already done so) to see what, if anything, was missing in your husbandry.
Amphibians are also very sensitive to chemicals in their water, so if you were using water straight from the tap, the chlorine in the water may have been causing the problem.
Unfortunately the only sure way to know what caused the frog's death is to have a vet experienced with amphibian/reptile care do a necropsy. However, to do this, the frog will need to have been kept in the fridge from the time he died and when you bought it to the vet. If frozen, this breaks down the cell structure and makes it impossible to determine cause of death.
Sorry for your loss. White's tree frogs are quite fascinating creatures and very interesting as pets.