Praise be to Allah.
Allaah has mentioned in His Book the “self‑reproaching person” [al-Qiyaamah 75:2]; this is the soul which blames or reproaches one for falling short in any act of obedience or worship, or for doing any forbidden action.
It so happened that many of the salaf missed out on doing good and they blamed themselves, and they thought that they should discipline themselves by doing more acts of worship and obedience. There were some of them who did forbidden things and responded in the same way.
By examining their deeds, it becomes clear to us that they did not go against Islam in that. Some of them were among the Sahabaah (companions of the Prophet), who did that during the time when the Qur’aan was being revealed. Some of them were imams (leaders in knowledge) who had great knowledge and issued fatwas (verdicts), and they thought that that did not go against the laws of Allaah, may He be exalted.
If we study the way in which they disciplined themselves by doing acts of worship, we will see that they did not fall into the mistakes that others who were not scholars of Ahl al-Sunnah (strict followers of the Prophet)made. They did not burden themselves with more than they were able to do; they did not harm themselves physically with burning or breaking. Their deeds were more like a righteous vow, which is where a Muslim commits himself to doing an act of worship that has not been enjoined by Allaah, without that being connected to healing, success etc.
Examples of that include the following:
1 – Imam Ahmad (18930) narrated, in a report classed as hasan (sound) by Shu’ayb al-Arna’oot (4/323), about the story of the treaty of al-Hudaybiyah, that ‘Umar ibn al-Khattaab (may Allaah be pleased with him) questioned the Prophet (peace and blessings of Allaah be upon him) about the clauses of the treaty, then he realized that he had no right to do that. He (may Allaah be pleased with him) said: “I carried on giving charity, fasting, praying and freeing slaves because of what I had done that day, for fear of the words I spoke, until I hoped that it was ultimately a good thing.”
2 – al-Bukhaari (5725) narrated that ‘Aa’ishah (may Allaah be pleased with her) vowed not to speak to ‘Abd-Allaah ibn al-Zubayr, but al-Miswar ibn Makhramah and ‘Abd al-Rahmaan ibn al-Aswad interceded for him, and they brought him into her house – as she was his maternal aunt – and he embraced her, urging her (to forgive him) and weeping, and they kept on at her until she spoke to him, and she freed forty slaves as expiation for her vow.
3 – If Ibn ‘Umar (may Allaah be pleased with him) missed a prayer in congregation, he would spend that night in prayer.
4 – Ibn Abi Rabee’ah missed the two-rak’ah Sunnah prayer of Fajr, and he freed a slave.
5 – Harmalah said: I heard ‘Abd-Allaah ibn Wahb say: I vowed that every time I backbit about a person, I would fast for a day. That made me feel tired, for I used to backbite and fast, and then I decided that every time I backbit about a person I would give a dirham in charity, and for love of money I stopped backbiting.
Al-Dhahabi said, commenting on this: This, by Allaah, is how the scholars were, this is the fruit of beneficial knowledge.
Siyar A’lam al-Nubala’ (9/228).
6 – It was narrated from ‘Abd-Allaah ibn ‘Awn that his mother called him and he answered her in a louder voice than hers, then he freed two slaves.
Siyar A’laam al-Nubala’ (6/366).
We have mentioned other information about this issue in the answer to question no. 27082.
We think that it is not appropriate to stipulate a specific number of dhikrs for every act of worship mentioned in the question and to adhere to these numbers every time, but stipulating a number once is fine. This is like vowing to fast for a certain number of days or to give a certain amount in charity. As for doing that on an ongoing basis, it seems that this is not permissible. You should remember Allaah a great deal (dhikr), pray for forgiveness and send blessings upon the Prophet (peace and blessings of Allaah be upon him) all the time; that is not limited to times when one has fallen short in worship.