.
The spiritual source of our involuntary, evil/immoral or baseless thoughts of doubts, fears/worries, lust, greed, selfishness, hate, anger, jealousy, etc, is the devil - the result of Adam's Original Sin - GENESIS.3:14-19, ROMANS.5:12, JOHN.8:44, MATTHEW.16:23 & 23:27, MARK.7:21, 1JOHN.3:8.
Learn to counter such involuntary evil thoughts from the devil with the Law/Word of God(MATTHEW.4:1-11) and/or just ignore them(= let the evil thoughts come and go). We should not entertain such thoughts and allow them to bear fruit into voluntary sins/evil-deeds/law-breaking against God, our neighbor/friend/family or ourselves, eg blasphemy, murder/suicide, adultery/AIDS, stealing, lying/cheating/ /being cheated, dishonor parents, social withdrawal, etc.
.
I think, like most of the Jews, Judas Iscariot did not accept Jesus as the Christ/Messiah/Saviour and so betrayed Him to the Jewish Temple authorities. The Jews wanted a Messiah/Christ who would defeat the Roman occupiers and give them back their kingdom of earth, ie Judah/Israel.(JOHN.6:15)
... Judas realized his grave mistake after the resurrection of Jesus Christ when Jesus appeared to the other apostles/disciples over 40 days except for him. Even doubting Thomas got a visit from Jesus.(JOHN.20:28) So, Judas knew for certain that he was bound for hell when he dies = he committed suicide.
... Did you betray Jesus Christ/God.? Do you know for certain that you are bound for hell when you die.?