If you think your snake is dying... go to the vet.
A vet can force feed, check for parasite, give vitamin injections, and ultimately save your snake.