God has given us control over our thought processes. We are told to cast down every vain imagination that exalts itself above God.
To answer the question of the post, God does not "punish" His children. He chastizes us. the differents being Punishment is the penalty of wrong doing. Jesus bore all the penalty for sin on calvary.
Chastizment means to restrain, and correct. The believer is chastized by God the Father, to correct behavior in us that is unbecomming a child of God.
Those who reject Christ will suffer the eternal punishment of seperation from God.