wa Aleykum Salam
The Prophet sallAllahu aleyhi wa sallam said, "Allah has forgiven my followers the evil thoughts that occur to their minds, as long as such thoughts are not put into action or uttered." And Qatada said, "If someone divorces his wife just in his mind, such an unuttered divorce has no effect.[Bukhari]
Bad thoughts are not sins, so as long as you supress them, then you won't be punished.
First of all, you need to accept that this is a problem.
No 2 is to know that bad thoughts are from Shaytan.
So when you get these thoughts, seek refuge from shaytan.
And if an evil whisper from Shaytaan (Satan) tries to turn you away (O Muhammad) (from doing good), then seek refuge in Allaah. Verily, He is the All‑Hearer, the All‑Knower”
[Fussilat 41:36]
And you need to know that bad thoughts came to the best of the creations, the sahaba.
Some of the Sahaabah complained about the waswaas that was bothering [?] them. Some of the companions of the Messenger of Allaah (peace and blessings of Allaah be upon him) came to the Prophet (peace and blessings of Allaah be upon him) and said to him, ‘We find in ourselves thoughts that are too terrible to speak of.’ He said, ‘Are you really having such thoughts?’ They said, ‘Yes.’ He said, ‘That is a clear sign of faith.’” (Narrated by Muslim). (Narrated by Muslim, 132 from the hadeeth of Abu Hurayrah).
Al-Nawawi said in his commentary on this hadeeth: “The Prophet’s words, ‘That is a clear sign of faith’ means, the fact that think of this waswaas as something terrible is a clear sign of faith, for if you dare not utter it and you are so afraid of it and of speaking of it, let alone believing it, this is the sign of one who has achieved perfect faith and who is free of doubt.”
“Ever feeble indeed is the plot of Shaytaan” [al-Nisa’ 4:76 – interpretation of the meaning]. Every time a person wants to turn to Allaah, waswaas brings other matters to mind. The Shaytaan is like a bandit: every time a person wants to move towards Allaah, he wants to block the way. Hence when it was said to one of the salaf that the Jews and Christians say, “We do not experience waswaas,” he said, “They are speaking the truth, for what would the Shaytaan do with a house in ruins?”
(From Fataawa Shaykh al-Islam Ibn Taymiyah, 22/608)
My personal tip is to hang out with brothers/sisters (depends on if your a bro or a sis) that won't accept you to sin infront of them, and how could shaytan make you to sin infront of them?
#1 InshaAllah, you would feel to shy to sin infront of them,
#2 As Allah said, Ever feeble indeed is the plot of Shaytaan” [al-Nisa’ 4:76]
His plot is weak.. It's easy, you should know that, when the thoughts come up, get busy with sometihng else and try not to get too much spare time where you don't know what to do.
Also in company, you can feel how weak his plot is, he can't do you anything wa allahu alem.
more info:
http://islamqa.com/index.php?ref=257...#37;20thoughts
Salam Aleykum