Praise be to Allah the Lord of the Worlds.
Cursing the religion or the Lord is prohibited and one who does so is an apostate. Apostasy leads to the dissolution of his marriage contract. Whoever hears him cursing should advise him to repent and retake the Shahadah. If he does repent while his wife is observing Iddah, then their marriage contract remains valid. However, if he doesn`t repent then the matter is referred to a Sharia judge.
Undoubtedly, apostasy is graver than Kufr. However, he doesn`t become deserving of death until it is proven in court that he is an apostate and after the judge asks him to repent. If he insisted on apostasy, then the judge decides the proper punishment. Moreover, none except the ruler and the judiciary may order killing that person to avoid discord among the people. And Allah the Almighty knows best.