The digest of Tisha B’Av laws in The Koren Mesorat HaRav Kinot specifically mentions that one may apply deodorant to oneself on Tisha B’Av (p. 787 par. 17). While it would normally be considered anointing oneself, one of the forbidden activities of Tisha B’Av, it falls under an exception.
One is allowed to anoint oneself for any purpose that is not pleasurable (S.A., O.H. 554:15). This includes medical ointments and deodorant (B.H. 554:15).
While I wrote this, it does not solely represent my personal view and was reviewed by both R. Menachem Genack and R. Hershel Schachter, as well as others, prior to publication. I would like to explain the background behind this decision.
While anointing oneself is forbidden on various occasions, this is only when anointing for pleasure. Doing it for medical reasons is allowed. But the in-between cases that aren’t clear include anointing oneself with perfumed oil for reasons that are neither medical nor pleasurable, such as to remove an unpleasant odor. In the laws of Yom Kippur, the Shulchan Arukh (Orach Chaim 614:1) forbids rubbing an oil on yourself even to remove an unpleasant odor. Only anointing for medical purposes is allowed.
However, in the laws of public fasts, when discussing a fast day declared in a severe drought, the Shulchan Arukh (Orach Chaim 575:3) writes that anointing is forbidden but is allowed to remove an odor. Regarding Tisha B’Av, the Shulchan Arukh (Orach Chaim (524:15) does not specify whether anointing to remove an odor is allowed. This leaves us the question whether Tisha B’Av is like Yom Kippur in this regard or a public fast. Is any non-pleasurable anointing allowed or only medical anointing?
The Mateh Yehudah (ibid. – link) quotes the Gemara (Pesachim 54b) which says that the only difference between Tisha B’Av and Yom Kippur is that the doubtful time is forbidden on the latter and permitted on the former. Evidently, the rule of anointing is the same for both days. Therefore, the Mateh Yehudah rules that anointing to remove an odor is forbidden on Tisha B’Av.
However, the Mishnah Berurah (Bi’ur Halakhah 554:15 sv. sikhah) argues that the Mateh Yehudah is reading that passage overly literally. Not only does the Talmud Yerushalmi (quoted in Bi’ur Ha-Gra on Orach Chaim 614:1) say explicitly in multiple places that Tisha B’Av follows other fast days and not Yom Kippur in this respect, but the Gemara (Ta’anis 30a) says that all the rules of mourning (shivah) apply on Tisha B’Av. Since the Gemara (Ta’anis 13b) explicitly permits a mourner during shivah to anoint himself in order to remove an odor, this by implication permits it also on Tisha B’Av.
The Mishnah Berurah therefore rejects the Mateh Yehudah‘s ruling and permits anointing oneself on Tisha B’Av in order to remove an odor. This is the equivalent of applying scented deodorant, which is allowed even on Tisha B’Av.