Every thought that comes to our mind is not from our mind! Some of them could be from our mind, some from God, some from other people’s opinions and some from the Devil! In the same way, every thought that we think is from God need not be from God. It could even be from the Devil who sometimes masquerades as an angel of light (2Co.11:14), appearing to be from God. Especially when he comes quoting from the Bible we need to be extremely careful to examine what exactly he is trying to make us believe. His goal is always to steal and destroy (Jn.10:10), even if he gives the impression that he is there to bless us. He is known as the Deceiver because he uses wily ways to fool and mislead us.
Look at a common situation. Here is a sincere Christian battling with temptation, recognising that he is not always winning, and feeling bad about how he is failing his Master. Then the Devil reminds him from the Bible about how God hates sin, how strict His laws are, how He is always righteous and deals without partiality with anyone who sins, etc. The Christian believes this is coming as conviction from the Holy Spirit and mourns his condition to the extent that he fears his salvation may be lost. He becomes miserable and begins to lose hope, until finally he is able to hear the real voice of the Holy Spirit who comforts and encourages him.
On the other side, look at a carnal Christian living for the world, enjoying all the pleasures without bothering to see if they are pleasing to the Lord. Satan comes to him too, this time reminding him of who he is in Christ, of all God's mercies that are new every morning, how salvation is by unmerited favour, how he doesn't have to do anything to earn God's blessing, how he should just believe, etc. It causes this man to sing loud praise and worship songs on Sundays and go home happily thinking that everything is just fine. He assumes that when the Holy Spirit tries to convict and warn him it is the voice of the Accuser trying to condemn him, and he discards all such warnings.
Satan is a master at quoting the wrong verse. Unless we are familiar with the different things God has said, we are likely to go off track. When the Holy Spirit speaks to us, He speaks seeking to help us. This 'help' may involve pointing out our sin or error, but will always give us hope, inviting us to receive forgiveness and change of heart. But when Satan speaks, he tries to hide our real need from us and lead us away from God. He makes things look hopeless, blows up the size of our sin, and condemns us. He puts pressure on us by which we feel we have no choice but to follow his instructions. But our safest step is to throw ourselves into God's merciful hands and trust Him to do the right thing. When we do that, the pressure and the darkness disappear and peace comes in.
As we go through this exercise we will learn to differentiate between the two voices, and stop assuming that it is always either one of the two.