Praise be to Allah.
The scholars unanimously agreed that if mucus and phlegm pass the throat of the fasting person without him being able to expel them, that does not invalidate the fast, because that is beyond the fasting person’s control.
Shaykh Zakariyya Al-Ansari Ash-Shafi`i (may Allah have mercy on him) said:
“If the mucus comes from the mouth or nose and goes down into his throat and he is unable to expel it, that does not break the fast, because he is excused.” (Asna Al-Matalib, 1/415)
However, if the fasting person swallows it after being able to bring it out of the throat (to the mouth), some of the scholars, such as Imam Ash-Shafi`i (may Allah have mercy on him), are of the view that the fast is invalidated thereby.
But the view of Abu Hanifah and Malik (may Allah have mercy on them), and one view narrated from Ahmad (may Allah have mercy on him), is that it does not invalidate the fast. This view is the one that is regarded as more likely to be correct by Shaykh Ibn `Uthaymin (may Allah have mercy on him). (See Al-Majmu`ah Al-Fiqhiyyah, 36/259-261)
Ibn Nujaym Al-Hanafi (may Allah have mercy on him) said:
“If mucus enters the fasting person’s nose from his head, then he sniffs it up and it enters his throat, as a result of a deliberate action on his part, that does not affect his fast, because it is like his saliva.” (Al-Bahr Ar-Ra’iq Sharh Kanz Ad-Daqa’iq, 2/294)
An-Nafrawi Al-Maliki (may Allah have mercy on him) said:
“Phlegm that comes up from the chest to the back of the tongue and is swallowed does not require the fast to be made up, even if it is possible to expel it. The same applies to mucus, even if it reaches the back of the tongue and is deliberately swallowed; it is not required to make up the fast in any of these cases.” (Al-Fawakih Ad-Dawani, 1/309)
Shaykh Ibn `Uthaymin (may Allah have mercy on him) said:
“If the mucus does not reach the mouth, in the sense that the person feels it coming down from inside his head, and it goes to his throat, that does not break the fast. That is because it has not reached the outside of the body, and the mouth comes under the same ruling as the outside. But if it reaches the mouth then he swallows it after that, that does break the fast. But if it does not reach the mouth, then it still comes under the ruling of what is inside, so it does not break the fast.
There is another view concerning this issue, which is that it does not break the fast even if it reaches the mouth and he swallows it. This view is more likely to be correct, because it did not come out of the mouth, so swallowing it is not regarded as being like eating or drinking.” (Ash-Sharh Al-Mumti`, 6/424)
To sum up, your fast is not invalidated because of the effects of sinusitis, such as mucus, blood and the like. But if you are able to expel it and spit it out, that is preferable, so as to be on the safe side with regard to your fast.
We ask Allah to grant you healing and well-being.
And Allah knows best.