How to rid oneself of major hypocrisy
Question

What is the remedy for major hypocrisy? How can a person rid himself of major hypocrisy?
Praise be to Allah.Major hypocrisy is when a person inwardly disbelieves but outwardly shows himself as a Muslim.
Al-Jurjani (may Allah have mercy on him) said:
The hypocrite is the one who conceals kufr (disbelief) in his heart and inwardly adheres to it, but outwardly tells people that he is a believer."(At-Ta‘rifat, p. 298).
As for minor hypocrisy – which is also known as hypocrisy in actions – it means making an outward display of doing righteous deeds, whilst concealing something else in one’s heart, or harbouring in one’s heart something other than what one shows outwardly, but that has nothing to do with the fundamentals of faith.
That includes having the characteristics of the hypocrites, namely lying, treachery and breaking promises.
See the answer to question no. 153691 .
If a person makes a show of believing in Allah, His angels, His Books, His Messengers and the Last Day, and conceals in his heart something that is contrary to that or contradicts some of it, then he is a hypocrite in the sense of major hypocrisy.
These are the ones to whom Allah, may He be exalted, refers in the verse (interpretation of the meaning):
{Indeed, the hypocrites will be in the lowest depths of the Fire} [An-Nisa’ 4:145].
This is like the hypocrisy of Ibn Salul and the other hypocrites of whom Allah, may He be exalted, says (interpretation of the meaning):
{And of the people are some who say, “We believe in Allah and the Last Day,” but they are not believers.
They [think to] deceive Allah and those who believe, but they deceive not except themselves and perceive [it] not.
In their hearts is disease, so Allah has increased their disease; and for them is a painful punishment because they [habitually] used to lie.
And when it is said to them, “Do not cause corruption on the earth,” they say, "We are but reformers."
Unquestionably, it is they who are the corrupters, but they perceive [it] not.
And when it is said to them, “Believe as the people have believed,” they say, “Should we believe as the foolish have believed?” Unquestionably, it is they who are the foolish, but they know [it] not.
And when they meet those who believe, they say, “We believe”; but when they are alone with their evil ones, they say, “Indeed, we are with you; we were only mockers.”
[But] Allah mocks them and prolongs them in their transgression [while] they wander blindly.
Those are the ones who have purchased error [in exchange] for guidance, so their transaction has brought no profit, nor were they guided.
Their example is that of one who kindled a fire, but when it illuminated what was around him, Allah took away their light and left them in darkness [so] they could not see.
Deaf, dumb and blind - so they will not return [to the right path].
Or [it is] like a rainstorm from the sky within which is darkness, thunder and lightning. They put their fingers in their ears against the thunderclaps in dread of death. But Allah is encompassing of the disbelievers.
The lightning almost snatches away their sight. Every time it lights [the way] for them, they walk therein; but when darkness comes over them, they stand [still]. And if Allah had willed, He could have taken away their hearing and their sight. Indeed, Allah is over all things competent} [Al-Baqarah 2:8-20].
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
Some hypocrisy is major, and the one whose hypocrisy is of this type will be in the lowest level of Hell. This is like the hypocrisy of ‘Abdullah ibn Ubayy and others of his ilk, who openly disbelieve in the Messenger, or reject some of what he brought, or hate him, or do not believe that they have to follow him, or feel happy when his religion suffers a setback, or feel upset if his religion prevails, and so on. Such a person cannot be anything but an enemy to Allah and His Messenger.
This type of hypocrisy existed at the time of the Messenger of Allah (blessings and peace of Allah be upon him) and continued after that. In fact, after he passed away it became greater than it had been during his time, because the reasons to have strong faith were greater at his time; even though those reasons for having strong faith were greater, hypocrisy still existed at his time, so it is more likely that it would exist at other times when those reasons were not as great as they had been."(Majmu‘ al-Fatawa  28/434).
The way to rid yourself of major hypocrisy is by entering into the religion of Islam sincerely, affirming and believing wholeheartedly in Allah, His angels, His Books, His Messengers, the Last Day, and the divine decree, both good and bad.
And you should testify that there is no god worthy of worship except Allah and that Muhammad is the Messenger of Allah with certainty in your heart, out of love for Allah and His Messenger.
Any hypocrite who repents, cleanses his heart, and shows sincere devotion to Allah is one of the believers.
Allah, may He be exalted, says (interpretation of the meaning):
{Indeed, the hypocrites will be in the lowest depths of the Fire - and never will you find for them a helper
Except for those who repent, correct themselves, hold fast to Allah, and are sincere in their religion for Allah , for those will be with the believers. And Allah is going to give the believers a great reward} [An-Nisa’ 4:145-146].
And Allah knows best.