I know that many poskim hold that on tisha be’av one should not rinse ones mouth with water out of fear of perhaps swallowing the water? What about mouthwash in which no one swallows? Why should this be worse than washing dirty hands? Dirt is dirt whether its on your hands or mouth.
As you rightly note, there is a distinction between water, which a person might swallow, and mouthwash, which people are careful not to swallow anyway.
Therefore, under conditions of (severe) discomfort, it is permitted to use mouthwash. This should not be done without discomfort, because we prefer not to place anything in the mouth on Tisha Be’Av.
See Shulchan Aruch 567:3; Darkei Moshe1; Eliyah Rabba 5; Be’er Heitev 5; Chayei Adam 132:20; Aruch Hashulchan 3; Mishnah Berurah 11; Kaf Hachaim 14; Toras Chaim 12; Dovev Meisharim 1:124 (some of the above authorities permit rinsing one’s mouth with water in times of need even on Tisha Be’av, but not on Yom Kippur). Concerning mouthwash, see Be’er Moshe vol. 8, permitting rinsing even on Tisha Be’av.