there are two temp switches, the one you found and one on the coolant elbow coming from the head, it is the high speed switch, the other is the low speed switch.
The clicking will be the fan control unit. If its faulty swap it with one from a scrapper as I think thats your problem. The switches tell the control unit to turn the fan on and it does it. If both switches report overheat the unit puts the fan on high speed.
Its mounted on the suspension turret.