I reside on a farm in southern Africa, in a household where geckos live in the house as a matter of course without being pets. I accidentally closed the door on a gecko buddy. He/she/it/they managed to protect their body in the crevices of the door, bar a couple of toes on one foot and the tail. I assumed it would just drop the tail (as is the norm for this species of lizard, Turner's thick-toed gecko (Chondrodactylus turneri)), but saw it later that evening scuttling about the ceiling. In good form, but the tail was limp and discoloured. Will the buddy be okay, will it drop the damaged tail, or will the tail recover? Or did I smash the vertebrae so it can't drop the tail? What can I do to help?
I am not a gecko expert. But after some research, I found that the gecko will likely be A-OK. The tail is probably just bruised up a little bit. However, if the tail does not look better within maybe a month or so, you may want to have it looked at. Judging from the fact that you are a human being, and closed a door on the poor little guy, the lizard's strength against yours is not even arguable. Damage was definitely done, whether it's in the form of a bruise or a break, the poor guy was definitely injured. But it will not die unless of course, there's something you're not seeing. It could also be tail rot, which from what I can tell, is basically a really, really bad bruise. You should take a look at an article I found right here.
Please remember that this forum is not from veterinarian professionals and while some people here are vets, this is not a replacement for a real medical evaluation, Like I said, I am not a gecko expert (but if you need something about dogs, I'm your guy) however, I did quite a bit of research to find this stuff.