Need help with our one and only clam we have ever had. I think it might be dead and need to know if/when I need to pull it out of the tank.

It has fallen of the rock twice now, when I picked it up last night its foot was pulled up. I blew the sand off it and it did seem to close up some.

Now when I got home from work, it was again fallen and does not respond at all. It is gaping open, does not attempt to close at all and appears kind of shriveled up inside the shell. It is still attached inside, so I am not sure.

Anyone with experience, dead? Pull it out tonight? Once I pull it out, what do I do with it to get the dead clam out and keep the shell for the tank.

Thoughts and guidance please
-Thanks- Mike (& Kristy)