“Went through this...” Sounds funny. As if every believer doesn’t doubt at some point. This is the essence of faith, some doubt but have faith, some don’t have faith. You sound like it was a revelation to you. It’s the standard human condition.
I went through the motions, and tried to pretend I believed, but in the end I decided to quit lying to myself and accept the fact that I just didn't believe, and couldn't fool myself into doing so. With age came a growing lack lack of concern for what other people thought, so I quit worrying about it.