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.
In the Islamic law, it is permissible for a Muslim to defend himself against transgression and to respond to abuse with equal force as long as that does not entail something prohibited, such as insulting the transgressor's parents or the like. However, it is better to pardon the transgressor.
As-Sa‘di said in his interpretation of the verse that reads (what means): {Allaah does not like the public mention of evil except by one who has been wronged} [Quran 4:148]: "'Except by one who has been wronged', i.e., it is permissible for him to evoke Allaah in supplication against the one who has wronged him and to grieve his transgression. He may speak out openly against the one who speaks evil against him publicly, without telling lies about him and without exceeding the level of transgression. And he should not transgress and revile anyone other than the one who wronged him. However, forgiving him and not responding in kind is preferable."
As for assaulting the transgressor by hitting him in this case, it is impermissible because it constitutes transgression, especially since hitting generally results in injury. This is relevant to someone who is personally wronged. For more benefit, please refer to Fataawa 83764 and 122438.
As for acts of blasphemy against Allaah or the Prophet, sallallaahu ‘alayhi wa sallam, the Muslim authority or his deputy are the ones entitled to punish the blasphemer and retaliate against him. Whoever hears a person uttering such blasphemous statements should report the case to the concerned authority that has the power to deter him. As for those living in non-Muslim countries, they can refer the case to the courts and avail themselves of the laws that criminalize such actions and thus file a claim against the transgressor.
Finally, we would like to point out the danger of living in the countries of idolaters and what it involves of Muslims falling into much inconvenience and concern for their religion, lives and honor. Based on this, the scholars have warned against residing there without necessity or need. Please refer to Fatwa 86405.
Allaah Knows best.