Those pellets In the bottom of it are lead i think so you would want to get them out asap. The "red stuff" in a thermometer used to be mercury so you may want to look up how to clean it up or dipsose of it incase it leaked in. ( i dont know if they still are or not)
Just get the lead out. Nothing is going to happen even if you leave the lead in the tank.
However, it is unhealthy for fish to have it around. How unhealthy depends on how much lead/how much water we are talking about and what type of fish you have. For example, common carps can eat thermometers for breakfast.
my green terror did the same thing all was ok lead used to go into lakes by the tone lead used in fishing and the shot in shot guns used in duck shooting if you can get it out ok if not don't panic I mean lead pipes use to run our water supply ok I know its not good for you but in the small quantity it should be ok the worst bits the mercury but if that's ok should be ok