The Torah tells us that a “mitztaer” (a person in pain) is exempt from the mitzvah of Sukkah. One may say that this exemption of a mitztaer being pattur from S
The Radvaz, the Birkei Yosef and the Sdei Chemed all say that a mitztaer is not only pattur from Sukka, but from all other mitzvos too. The Chelkas Yoav differentiates between Sukkah and other mitzvos. Even the slightest tzaar is enough to patter one from the mitzvah of Sukkah; however, regarding other mitzvos one may be patter only if he has a lot of tzaar.
The following question arises in the Shulchan Aruch in siman taf ayin bais, seif yud. How can the ruling of the Shulchan Aruch who states that despite the fact that one has tzaar from drinking wine one still needs to be mekayem the mitzvah of dale
The answer could be that daled kosos is a mitzvah of pirsumei nisa. It is so important, that the halacha states that one is required to sell the shirt off his back if need be to be mekayem the mitzvah of dale
The Shulchan Aruch in siman resh tzaddik alef says that if one has tzaar eating seuda shlishis he is exempt. This would be a proof that mitztaer applies to other mitzvos besides the mitzvah of Sukkah. One may argue with this and say that Seuda Shlishis is different as the mitzvah was given as an Oneg for Shabbos and one who is in pain does not have oneg; therefore one would be exempt from eating Seuda Shlishis if one is in pain.
What is the case regarding a mitzvah MiDerabbonon where Cha
I am not going to pasken here. I will just state various shittos and reasonings. For an actual psak one should consult a Rov.
The Radvaz says that since mitztaer is pattur from all mitzvos (not just Sukkah), one may shave or take a haircut during sefirah.
According to the Mishna Berurah one is exempt from eating the third meal on Shabbos if one is in pain because he does not have oneg when in pain. Therefore, this argument does not apply during sefira so one would not be able to shave or take a haircut even if one is in pain.
The Chavos Yair in siman kuf tzaddik alef says that there is a rule: (gadol kvod habriyos that it is docheh issurim DeRabbonon) a person’s honor is so important that it supercedes a prohibition that is DeRabbonon. Therefore, a kal v’chomer may be seen, where one is in pain, he most certainly would be exempt.
The Ohr Sameach argues with this and says that “bizayon” embarrassment is certainly worse than pain.
Regarding Sefira, the halacha might be more lenient as it is just a minhag.
One may argue and say that this minhag is based on aveilus for the talmidim of Rabbi Akiva and therefore being in pain might be the exact thing that is required to remind us of the zman of aveilus.
These are just thoughts on this topic, not a psak.