So the first task is to identify what needs to be rejected.
The Nefesh HaChaim of Reb Chaim from Volloshin certainly does a great job in terms of one half of this problem. And The Rambam in the Guide does a great job with the other half. The problem is really how to put both together.
The point almost all religious people are affected by the delusion of moral superiority along with a assortment of various fantasies.. Non religious people have their own set of different kinds of delusions. Finding the right balance is essential,- along with some way of safeguarding that balance.