 Allah SWT says in the Qur'an say, oh my servants who have transgressed against their own souls asrafu ala anfusihim who have utterly corrupted themselves, la taqnatume rahmatillah, never ever despair of the mercy of Allah SWT. It is impermissible. It is haram, just as haram as drinking wine, eating pork and fornication. It is haram to despair of the mercy of Allah SWT, to be in a state of qunud of Allah SWT. La taqnatume, this la in Arabic is Allah annahiya, the prohibitive la. You are not allowed to despair of the mercy of Allah SWT. Allah forgives all sins. He is the forgiving and He is the merciful.