All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Breaking the fast during the day in Ramadan without a legal excuse is a great major sin. Allaah warned us very strongly against it. The Prophet said: "Whoever breaks the fast during one day in Ramadan without any legal excuse, he will not make up for that day even if he fasts eternally." [At-Tirmithi, Ibn maajah and others.]
The legal excuses that make it lawful for the person to break the fast are traveling or being sick, and the like.
As for feeling pain because of empty stomach or staying for many hours without eating, these are not legal excuses as they are normal during fasting.
So, now you should repent to Allaah and make up for the day you failed to fast as prescribed.
Allaah knows best.