I think that implying the spider is actually able to recognize itself is a little too far. It would require a level of awareness comparable to that of apes and dolphins. Not even dogs are able to recognize themselves when put in front of a mirror.
While not a scientific article, here's an interesting read about corvids (crows, jays) presenting two sides of the argument that the birds possess theory of mind: