Yes, bad thoughts are bad, Jesus says that if you look at a woman and lust, you have committed adultery already, and He also said if you are angry you will be judged
Matthew 5:28 But I tell you that anyone who looks at a woman lustfully has already committed adultery with her in his heart.
Matthew 5:21-22 You have heard that it was said to the people long ago, 'Do not murder, and anyone who murders will be subject to judgment "But I say to you that everyone who is angry with his brother shall be guilty before the court; and whoever says to his brother, 'You good-for-nothing,' shall be guilty before the supreme court; and whoever says, 'You fool,' shall be guilty enough to go into the fiery hell