The blood that comes out from between the teeth does not invalidate the fast, whether it comes out by itself or because of another person hitting him.
And Allaah is the source of strength. May Allaah send blessings and peace upon our Prophet Muhammad and upon his family and companions.
Al-Lajnah al-Daa’imah li’l-Buhooth al-‘Ilmiyyah wa’l-Ifta, 10/267
But it is haraam for the fasting person to swallow this blood; if he swallows it deliberately then his fast is broken.