When learning the laws of mourning in the Gemara and rishonim I don't recall the requirement to cover up the mirrors in the house of a mourner. But it does seem like a quite prevelalant practice. Where did this practice begin and what is the reason for doing so?
Zvi Ron wrote an entire article about this in Ḥakirah (vol. 13).
To quote and summarize: the earliest source is the Hattam Soffer (19th century) [i]:
He explains that mirrors were turned around to face the wall based on the mourning practice of kefiat hamittah, overturning the beds. The Babylonian Talmud (Mo‘ed Katan 15b) gives Bar Kappara’s reason for this practice. Man was created in the image of God; because of human sin resulting in death this Divine image is ‘overturned.’ To represent this idea we overturn our beds. The Jerusalem Talmud (Mo‘ed Katan 3:5) gives another reason. The marital bed is the facilitator for relations between husband and wife to create new life. This facilitator is overturned when a life has ended.
Hatam Sofer explains that although we no longer practice the overturning of beds, the reasons given in both Talmuds apply to mirrors as well. Mirrors contain the image of the person looking into them, so mirrors are turned around because the Divine image in the deceased has been ‘overturned.’ Additionally, Rashi (Ex. 38:8) explains that in Egypt mirrors facilitated relations between husband and wife, just like the beds. Therefore the mirrors are turned around in a house of mourning, just as beds were overturned in Talmudic times.
R. Aharon Ziegler reports in the name of R. Soloveitchik th at the connection between overturned beds and mirrors is that both act as reminders that intimate relations are suspended during the shivah; furthermore, mirrors are an expression of vanity and should not be used in a house of mourning [ii]
A variety of other explanations have been proposed, such as mirrors bringing joy, mirrors being covered to facilitate prayer in their presence, avoiding seeing evil spirits that lurk in the house of the mourner.
Particularly this last reason which associates reflective surfaces with spirits; particularly of the dead, seems to have been a fairly common non-Jewish idea. Indeed, even the practice of covering the mirrors was practiced by gentiles, although sometimes without connecting it to this reason.
Thus, decades before the earliest mention of the practice in Jewish literature, we find funerals in Scotland being described [iii]:
I know not for what reason they lock up all the cats of the house, and cover all looking glasses as soon as any of the family dies, nor can they give any satisfactory account of it
Similarly, reflective surfaces were covered for President Lincoln's funeral:
The East Room, in which the remains were laid, was decorated in mourning... the windows at either end of the room were draped with black barege [a sheer fabric], the frames of the mirrors...being heavily draped with the same material. [iv]
Even earlier, in 1841, we find the same thing upon the death of President Harrison. [v]
Fascinatingly, This custom to cover mirrors after a death occurs is found all over the world, including the places where all the earliest Jewish references to the custom originated, Hungary, Romania and Transylvania.
Besides the countries already mentioned it has been documented in places as diverse as the Dominican Republic, England, China, India and Madagascar.
While today a popular Jewish custom, R. Moshe Tzuriel, has written that this is an inappropriate custom and should be discontinued. [vi]
[i] Hatam Sofer: Derashot (New York: Avraham Yitzchak Friedman, 1961) vol. 2, p. 774.
[ii] R. Aharon Ziegler, Halakhic Positions of Rabbi Joseph B. Soloveitchik (New Jersey: Jason Aronson, 1998) p. 122
[iii] History of Orkney (Kirkwall: Orkney Heritage Society, 2001), p. 55.
[iv] William T. Coggeshall, The Journeys of Abraham Lincoln (Columbus: Ohio State Journal, 1865) p. 110.
[v] Claire A. Faulkner, “Arlington’s Ceremonial Horses and Funerals at the White House”, White House History 19, p. 23.
[vi] Otzrot ha-Torah (Bnei Brak: 2005) vol. 2, p. 1017.