Rashi explains atheism to be a burden, as is hinted to in the words of Moshe Rabeinu.
Rabeinu explains that by traveling to the tzadik, one throws the burden of atheism off himself, because just taking the journey to the tzadik is in itself faith, the opposite of heresy.
38: Rabeinu explains that atheism has allowed people to speak against the true Tzadikim and those who fear G-d. This sort of atheism is truthfully directed against G-d, because of these people’s shame, they direct their words against the Tzadikim.
39: One must feel the pain of another individual, especially the pain of a community/the public, in his/her own heart.
To do this, you have to knock your head against the wall… meaning: strike your mind against the walls of the heart.
It is one thing to have da’at/consciousness and intellect, but true da’at exists in the heart. One must transfer that knowledge into the heart!