Here is some good reading for you. By the way, why is this an obsessive thought with you, if it is. Dangerous to entertain demons in your mind. They get in there and act like angels but you are unaware of their true identity and they slowly suck you to a state of depression, or, possession even, not good.
That said, we can know that a spirit is of God, Scripture says , by asking if the demon comes from God.
You are to ask the demon, 'Do you believe that Jesus Christ came to earth in the flesh? If they say 'no,' then you know to then REBUKE it , and do this act with faith inside you gained from your walk with God in you, His Holy Spirit and, do say 'in the name or Jesús,' for casting the spirit not of God that is a demon.
It (the demon(s) ) will flee, believers have this wonderworking, miraculous power by the authority of Jesus inside us , He will work through us to excercise the demon from where it be inside you.
Demons can be many things, and, they are powerful things that a demon will accurse you, like depression, like suicide. BUT, with/in the name of Jesus is an Almighty power that is more powerful than all the mustered doings of the prince of this world, who is Satan.
Greater is He who is in me than he (Satan, and, also, his demons) who is in the world.
Hope this helps, the testing of demons verses can be found in 1 John 4: 1-5 .
May you be markedforHim, brother, in all you do
The Lord leads, there, too,vthougu, Jesus says there are some demons that are tougher to excercise from someone, prayer and fasting are needed, you can read about tjis in Gospels.