All I can say is, it looks as if it is in shock. Test you water, and make sure everything is ok with the tank.
I hate to say it, but sometimes they don't make it. If there is a big difference between your water and the water at the place you bought it from, it can cause it to die.
Do anything you can to make it comfortable, as for as temp and water quality. Give it time in the dark. Hopefully it will come out of it. It is not dead until it lets loose of where it is stationed and shrivels up to nothing.