What your describing can only come from pictures (mental images) from your past, which were brought to the forefront by something in the sermon or church.
Solution -- avoid the church sermons.
We all have very long pasts and a lot of that has connections to not so good experiences connected to churches.
Back in the old old days the church ran our lives for us and a lot of it we didn't like.
It is nothing to worry about, you don't have any imbalances, you don't need to seek out any kind of specialist, just avoid the church and sermons for a while and if there is any hint of this kind off stuff happening just realize that it is just from something that you don't need to worry about or even analyze.
Put your attention on the present time surroundings.
Go out for a walk and look at the trees houses or what ever there is to look at.