Chameleons do not make good pets and they are very difficult to care for. The majority of chameleons sold as pets will become ill and die well in advance of their potential life span from a combination of husbandry errors including:
1. Provision of clean drinking water using a method that is accepted by the chameleon and stimulates a drinking response. Spraying three times a day will not accomplish this if the chameleon is startled as you describe.
2. A balanced diet that includes a minimum of five species of insects that are of the appropriate size for the chameleon, kept in hygienic enclosures, and fed on a nutritious diet. A diet of crickets and mealworms does not meet these minimum requirements.
3. Chameleons require good air flow and exposure to unfiltered sunlight - neither of which can be accomplished with a solid-walled enclosure such as the one you describe.
4. The effects of starvation and dehydration begin to weaken a chameleon within a few days. If your chameleon stopped eating and was not drinking, a veterinarian may have been able to counsel you on husbandry and provide the chameleon with fluids and nutrition with a feeding tube, but it has been a month since it ate and drank, it is too late to save it's life.
The description of your chameleon's condition indicates it is dying of starvation and dehydration. While chameleons cannot vocalize pain and suffering by crying or whimpering like a dog or cat, it is still suffering. It is your responsibility to have a veterinarian end this suffering as quickly as possible by humanely putting it to sleep.