If a person for whatever reason momentarily has a thought which denies God, but then afterwards reaffirms his belief in Hashem, is that an act of kefira? Does a momentary lapse in belief constitute a sin?
thoughts and suggestions are constantly placed in one's mind by the yetzer hara, as explained extensively in shaar yichud hamaase chapter 5. This includes thoughts of kefira as explained there, if the yetzer thinks you are vulnerable to those. (see enticements #1-8 in the above link)
so according to that, certainly not. it's only what you do with the thoughts afterwards that can be considered "your" making. i.e. how you debate, conclude with the yetzer and decide how to live your life as explained there.