Assalamu'alaikum Warahmatullah ya Syaikh.
If I'm making a joke that's considered as mockery to Islam inside my head (as I'm not saying it out at all), but I'm laughing out loudly because of it, would it be the same as mocking this religion (which's able to put a person outside Islam)? Please do bear in mind that in this situation, nobody know the reason why am I laughing.
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.
You can search for fatwa through many choices