Short answer
No. Telling a doctor, your family or a friend that you are in pain is not against sabr, and the Prophet ﷺ himself said "Oh, my head!" when he was ill. Complaining to Allah is part of patience. What goes against sabr is objecting to Allah's decree, raging at it, or wailing and tearing clothes. The four schools agree.
Describing pain and illness to people, especially to a doctor, is permissible. Turning to Allah with one's complaint is praiseworthy. Objecting to the decree in anger, and wailing, are forbidden.
The four schools agree on this.
Explanation
Some people think that a good Muslim must hide all pain and never say they are suffering. That is not the Sunnah. When Aishah said "Oh, my head!" the Prophet ﷺ replied, "Rather, oh, my head!" because he was in pain too. He also said that he suffered fever twice as much as an ordinary man, because the reward is doubled. Saying what you feel is human and allowed.
The prophets complained to Allah. Yaqub said, "I only complain of my suffering and my grief to Allah." Ayyub called out, "Adversity has touched me, and You are the Most Merciful of the merciful." Allah praised both of them for patience. So sabr is not silence. It is holding your heart, tongue and hands from what Allah dislikes while you go through the hardship.
What does go against sabr:
- objecting to Allah, such as "Why me? I did not deserve this" said in anger at His decree
- wailing, slapping your face or tearing clothes, which the Prophet ﷺ said is not from us
- complaining about Allah to people, as opposed to describing your symptoms
Telling your doctor everything is necessary, so that you get the right treatment, and you should follow a qualified doctor's advice. Telling family lets them help you. Many scholars say it is better to begin with praise of Allah, such as "Alhamdulillah, but I am in a lot of pain," but this is advice, not a condition.
Your patience is rewarded even when you also cry or say it hurts. See sickness wipes away sins and the dua for patience.
The evidence
Quran, Surah Yusuf 12:86
قَالَ إِنَّمَآ أَشْكُوا۟ بَثِّى وَحُزْنِىٓ إِلَى ٱللَّهِ وَأَعْلَمُ مِنَ ٱللَّهِ مَا لَا تَعْلَمُونَ ﴿٨٦﴾
He said, "I only complain of my suffering and my grief to Allah, and I know from Allah that which you do not know.
Complaining to Allah is part of patience.
Quran, Surah Al-Anbiyaa 21:83
۞ وَأَيُّوبَ إِذْ نَادَىٰ رَبَّهُۥٓ أَنِّى مَسَّنِىَ ٱلضُّرُّ وَأَنتَ أَرْحَمُ ٱلرَّٰحِمِينَ ﴿٨٣﴾
And [mention] Job, when he called to his Lord, "Indeed, adversity has touched me, and you are the Most Merciful of the merciful."
Ayyub voiced his pain to Allah and was praised for patience.
Sahih al-Bukhari 5666
Sahih... بل أنا وارأساه ...
"Rather, oh, my head!"
The Prophet expressed his own pain aloud.
Sahih al-Bukhari 5648
Sahih... إني أوعك كما يوعك رجلان منكم ...
"I suffer fever as much as two men among you."
He described the severity of his illness to others.
Sahih al-Bukhari 1294
Sahih... ليس منا من لطم الخدود وشق الجيوب ...
"He is not one of us who slaps his cheeks and tears his clothes."
Wailing and outbursts against the decree are what oppose patience.
Where the ruling is recorded
- Radd al-Muhtar (Ibn Abidin), Bab Salat al-Janazah, on wailing and mourning. Weeping is allowed; wailing, slapping and tearing clothes are forbidden.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.