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, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
According to the consensus of the scholars, blaspheming Allaah is considered disbelief which takes a person out of the fold of Islam, whether or not the blasphemer was angry, serious or jesting. Allaah Says (what means): {"Say," Is it Allaah and His verses and His Messenger that you were mocking?" Make no excuse; you have disbelieved after your belief. …} [Quran 9:65-66]
A person who has done this must sincerely repent, feel remorse, ask for forgiveness and re-embrace Islam, and should give up on the forgiveness of Allaah.
Allaah Knows best.