Hello and welcome,
The pain is due to the exposed cavity from which filling fell out.
The exposed dentine may be causing severe pain
as well as sensitivity.
I would advice you to keep a cotton dipped in formocresol solution within the open cavity temporarily which will prevent food lodgement.
The tooth has to be restored as soon as possible to prevent further progression of decay or periapical infection.
A thorough clinical as well as radiological evaluation of the tooth will help to decide the type of treatment to be undergone.
Maintain oral hygiene
Rinse your mouth after every meals.