All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Unspoken inner thoughts and self-talk are pardoned based on the Hadeeth which reads: "Allah has forgiven for my Umami their inner thoughts as long as they do not act (upon them) or verbalize them." [Al-Bukhaari and Muslim] Hence, experiencing such inner thoughts is pardoned. Your laughing, if it happened beyond your control or you were not content with such inner mockery, is not considered an act of disbelief. However, you should dislike such thoughts and strive to get rid of them. You should also strive to ward off obsessive whisperings if you are afflicted with them, for indulging in such whisperings leads to grave evil.
For more benefit, please refer to Fatwa 21800.
Allah Knows best.