How can I overcome waswas? How can I be truly sincere towards Allah?
Question

What is the way to overcome waswas (whispers from the Shaytan)? How can a person be sincere towards Allah and honest with Him in all matters of life?
Praise be to Allah.Firstly:
This devilish waswas (whispers from the Shaytan) and bad thoughts that cross one’s mind are passing thoughts that prevent a person from obeying and worshipping Allah, and make whims and desires fair-seeming to him and encourage him to give in to them.
Allah will not call a person to account for these things so long as he does not act upon them or speak of them. Al-Shaykh Ibn Baz (may Allah have mercy on him) said:
Whatever may occur to a person’s mind of bad thoughts, such as if he thinks of zina (fornication or adultery), stealing, consuming intoxicants and the like, but he does not do any of these things, then he will be pardoned for that and will not incur any burden of sin, because the Prophet (blessings and peace of Allah be upon him) said: “Verily Allah has forgiven my ummah for whatever crosses their minds, so long as they do not act upon it or speak of it.” Saheeh (authentic) – agreed upon.
End quote from Majmoo‘ Fatawa Ibn Baz (5/424)
Please also see the answer to question no.  39684
Secondly:
It is possible to overcome waswas and bad thoughts by means of the following:
·        Seeking refuge with Allah from the accursed Shaytan, turning sincerely to Him and beseeching Him a great deal
Allah, may He be exalted, says (interpretation of the meaning):
{And if an evil suggestion comes to you from Satan, then seek refuge in Allah . Indeed, He is Hearing and Knowing.
Indeed, those who fear Allah – when an impulse touches them from Satan, they remember [Him] and at once they have insight.}[al-A‘raf 7:200-201].
An example of that is seeking refuge with Allah from the Shaytan when entering the mosque and when exiting from it. Abu Dawood (466) narrated from ‘Abdullah ibn ‘Amr (may Allah be pleased with him) from the Prophet (blessings and peace of Allah be upon him) that when he entered the mosque he said: “A‘oodhu Billah il-‘Azeem wa bi wajhihi’l-kareem wa sultanihi’l-qadeem min al-shaytan il-rajeem (I seek refuge in Allah, the Mighty and His noble countenance and His eternal authority from the accursed Shaytan).” And when he said that, the Shaytan said: “He has been protected from me for the rest of the day. Classed as saheeh (authentic) by al-Albani in Saheeh Abi Dawood.
Ibn Majah (773) narrated from Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (blessings and peace of Allah be upon him) said: “When any one of you enters the mosque, let him send salams upon the Prophet (blessings and peace of Allah be upon him), then let him say, Allahumma aftah li abwab rahmatika (O Allah, open to me the gates of Your mercy). And when he leaves let him send salams upon the Prophet (blessings and peace of Allah be upon him) and say Allahumma i‘simni min ash-shaytan ir-rajeem (O Allah, protect me from the accursed Shaytan).” Classed as saheeh by al-Albani in Saheeh Ibn Maajah.
·        Seeking the protection of Allah against the Shaytan and not being afraid of him, whilst taking all precautions against his evil by obeying and remembering Allah
Allah, may He be exalted, says (interpretation of the meaning):
Indeed, the plot of Satan has ever been weak. [an-Nisa’ 4:76]
{Indeed, there is for him no authority over those who have believed and rely upon their Lord.
His authority is only over those who take him as an ally and those who through him associate others with Allah.} [an-Nahl 16:99, 100].
Abu Sulayman ad-Darani (may Allah have mercy on him) said:
Allah has not created any creation more insignificant to me than Iblees. Were it not that I have been instructed to seek refuge from him, I would never have sought refuge from him at all. If he were to appear before me, I would simply strike him on the face. End quote from Tareekh Dimashq (34/140)
·        Always reciting the adhkar of morning and evening, and the adkhar for going to sleep and waking up, and the adhkar of prayer, and other specific adhkar, and performing ruqyah as prescribed in Islam. These are among the greatest means by which the Muslim can protect himself against the tricks, whispers and insinuating thoughts of the Shaytan
·        Resisting waswas and passing thoughts, and not giving free rein to them
Ibn al-Qayyim (may Allah have mercy on him) said:
Ward off the passing thought, for if you do not do that, it will become an idea. Ward off the idea, for if you do not do that it will become a desire. Then fight it, for if you do not do that it will become a resolve and ambition, and if you do not ward it off it will become an action. If you do not counter it with its opposite, it will become a habit, and then it will be difficult for you to get rid of it. End quote from al-Fawaid (p. 31)
What the Muslim must do is resist these whispers and passing thoughts lest they take control and the problem become serious.
·        Keeping company with good people who will encourage you to do good, so that the Shaytan will find no way to reach the heart of the son of Adam, and keeping away from the company of evil people whom the Shaytan uses as a means to reach the heart of the son of Adam.
If a person keeps company with good people, his mind will be focused on their company and on what they are teaching him and advising him to do. But if he keeps company with evil people, his mind will be focused on the falsehood that he hears from them and that they encourage him to engage in.
·        Remembering Allah a great deal, reciting Quran, praying, and focusing on righteous deeds, both outwardly and inwardly
Al-Bukhari (6407) narrated that Abu Moosa al-Ash‘ari (may Allah be pleased with him) said: The Prophet (blessings and peace of Allah be upon him) said: “The likeness of the one who remembers his Lord and the one who does not remember his Lord is that of the living and the dead.”
Ibn al-Mubarak narrated in az-Zuhd (2/17) that Salman (may Allah be pleased with him) said: Every man has an inward aspect and an outward aspect. Whoever takes care of his inward aspect, Allah will take care of his outward aspect, but whoever causes his inward aspect to become corrupt, Allah will cause his outward aspect to become corrupt.
·        Remembering Allah when entering the house and when leaving it
Muslim (2018) narrated from Jabir ibn ‘Abdullah that he heard the Prophet (blessings and peace of Allah be upon him) say: “When a man enters his house, and mentions Allah when he enters and when he eats, the shaytan says: ‘You have no place to stay and no dinner.’ But if he enters and does not mention Allah when he enters, the shaytan says, ‘You have found a place to stay.’ And if he does not mention Allah when he eats, he says: ‘You have found a place to stay and dinner.’”
Abu Dawood (5095) narrated from Anas ibn Malik that the Prophet (blessings and peace of Allah be upon him) said: “When a man goes out of his house and says: ‘Bismillah, tawakkaltu ‘ala Allah wa la hawla wa la quwwata illa Billah (In the name of Allah, I put my trust in Allah, there is no power and no strength except with Allah),’ then it is said: ‘You have been guided, sufficed and protected,’ and the devils go far away from him, and another devil says: ‘what can you do with a man who has been guided, sufficed and protected?’” Classed as saheeh by al-Albani in Saheeh Abi Dawood.
Whoever Allah protects against the Shaytan when he comes in and goes out, He will protect him from his waswas and whatever he makes fair-seeming to him of evil.
·        Refraining from whims and desires, whilst adhering to the limits set by Allah
Sahl ibn ‘Abdullah (may Allah have mercy on him) said: “The individual must restrain his faculties and adhere to the limits set by Allah, and he must rein in his whims and desires. If he does that, Allah, may He be exalted, will protect his heart (from evil thoughts) and make his mind think aright. End quote from Bahr al-Fawaid by al-Kalabadhi (p. 125)
·        Seeking knowledge and focusing on that, for knowledge is light that revives the heart and dispels ignorance, and it dispels waswas and whatever bad thoughts one may be entertaining
The one who focuses his thinking on issues of knowledge, and contemplates in his mind the different views of the scholars, and their various opinions and methodologies in dealing with those issues, will bar the way to the Shaytan and he will keep away from his heart and mind.
Thirdly:
The ways in which a person may make his actions sincerely and purely for Allah in all his affairs are many and varied. They include the following:
·        He should make his words match his deeds and his outward actions match his inward thoughts.
·        He should make his deeds in accordance with that which is prescribed, that which Allah loves and is pleased with, and grants reward for.
·        By doing this righteous deed, he should seek the Countenance of Allah and the Hereafter.
·        He should keep away from bid‘ah (innovation) and every path that leads to it, and he should avoid keeping company with those who follow innovation and whims and desires, whilst also adhering to the Sunnah and keeping company with those who follow it, for a person will follow the way of his close friend.
·        He should take care to be sincere, from the heart, and he should strive to purify himself and cleanse his heart of shirk, showing off and seeking a reputation.
·        He should follow the path of asceticism and lack of interest in worldly gain; he should turn away from that, focusing  instead on obedience to Allah and turning to Him, without going to extremes.
·        He should be sincere towards Allah in his resolve to do good and when doing it. Allah, may He be exalted, says (interpretation of the meaning):
Obedience and good words. And when the matter [of fighting] was determined, if they had been true to Allah, it would have been better for them.(Muhammad 47:21).
He should not be one of those who engage only in  mere wishful thinking, which is of no benefit if it is not followed by righteous deeds and seeking reward with Allah.
·        His food, drink and clothing should all be from good, halal sources.
·        He should love for his Muslim brothers what he loves for himself of good, and he should hate for them what he hates for himself of evil.
·        He should fulfil the words of Allah, may He be exalted (interpretation of the meaning):
{Say, “Indeed, my prayer, my rites of sacrifice, my living and my dying are for Allah, Lord of the worlds.
No partner has He. And this I have been commanded, and I am the first [among you] of the Muslims.”} (al-An‘am 6:162-163).
All his actions should be preceded by sound intentions as much as possible, including when he eats, drinks, does his work, is intimate with his wife, keeps company with his friends and mixes with people
·He should study the biographies of righteous people among the slaves of Allah, those who are known for their sincerity towards Allah and their sincerity in their actions, and he should do as they did and strive to imitate them, for whoever imitates a people is one of them, and whoever loves a people will be gathered with them (on the Day of Resurrection).
For more information, please see the answer to question no.  126306 .
And Allah knows best.