We refrain from swimming or bathing during the Nine Days because of the attendant enjoyment or pleasure. Therefore, it would be preferable to seek some of the relief you seek from water via a shower, since it’s less pleasurable (and less visible).
However, if the swimming is for pain relief or just to relieve discomfort, then that is permissible during the nine days. You should only swim as much as needed to feel better.
Please let us know if we can be of further assistance.
Be-sha’ah tovah!