2,723. Mitigating the Misuse of God's Name

Hilchos Shevuos 12:10

The previous halacha applies when the one making the oath or reciting the bracha in vain did so intentionally; if he did so unintentionally, or if he doesn’t know that doing so is prohibited, one need not place him under a ban. The Rambam opines that it would actually be prohibited to place such a person under a ban because the Torah doesn’t call for unintentional violators to be punished. Rather, one should simply caution this person so that he doesn’t continue to do so. 

Hilchos Shevuos 12:11

It’s not only false oaths that are prohibited. Rather, it’s forbidden to speak any of the names unique to God even without making an oath, as per Deuteronomy 28:58, “…to revere the glorious and awesome name,” which includes not saying God’s name in vain. Therefore, if one accidentally speaks God’s name in vain, he should immediately praise God’s name in order to mitigate his misdeed. For example, one should say, “May He be blessed for all eternity,” “He is great and extremely praiseworthy,” or other such praises to temper having spoken God’s name in vain.