Praise be to Allah.
There is no dispute among the scholars concerning the fact that vomiting deliberately is one of the things that invalidate the fast, but if a person cannot help vomiting, that does not break his fast. This was mentioned by al-Khattaabi and Ibn al-Mundhir. See al-Mughni, 4/368.
The evidence for that from the Sunnah is the report narrated by al-Tirmidhi (720) from Abu Hurayrah, that the Prophet (peace and blessings of Allah be upon him) said: “Whoever cannot help vomiting does not have to make up the fast, but whoever makes himself vomit deliberately, let him make it up.” Classed as saheeh by al-Albaani in Saheeh al-Tirmidhi.
Shaykh al-Islam Ibn Taymiyah said in al-Fataawa (25/266): With regard to vomiting, whoever makes himself vomit deliberately has broken his fast, but if he cannot help vomiting, this does not break the fast.
Shaykh Ibn Baaz was asked about the ruling on one who cannot help vomiting when he is fasting – does he have to make up that day or not? He replied:
He does not have to make it up, but if he made himself vomit, then he has to make it up. And he quoted the hadeeth referred to above as evidence.
Shaykh Ibn ‘Uthaymeen was asked in Fataawa al-Siyaam (p. 231) whether vomiting in Ramadan breaks the fast. He replied:
If a person vomits deliberately, this breaks the fast, but if it was not deliberate then this does not break the fast. The evidence for that is the hadeeth of Abu Hurayrah (may Allah be pleased with him), and he quoted the hadeeth referred to above.
So if you cannot help vomiting, then you have not broken your fast. If a person feels that his stomach is churning and what is in it is going to come out, then do we tell him that he has to prevent it, or to make it happen? No, but we do say: take a neutral stance. Do not try to make it happen and do not try to prevent it, because if you make yourself vomit you will have broken your fast, but if you try to prevent it you will harm yourself. So leave it, and if it comes out without any action on your part, then it will not harm you and you will not have broken your fast.
If some of the vomit goes back into the stomach without any deliberate action on a person’s part, then his fast is valid, because this did not happen by his choice. The Standing Committee was asked (10/254) about a fasting person who vomited then swallowed his vomit without meaning to – what is the ruling in this case?
If he vomited deliberately then his fast is invalidated, but if he could not help it then his fast is not invalidated. Similarly it is not invalidated by his swallowing it so long as he did not do that deliberately.