OCD and numerous mental illnesses are rooted in the spirit of Fear, not faith. GOD has not given us a spirit of fear, but of power, of love, and of a SOUND MIND.
Actually, it can be because of faith that one wants to make sure they are walking in obedience, and having been raised with a strict conscience and in strict discipline then when that can result in focusing on every detail. Such are not to be scorned or marginalized, but valued as they seek to have a good conscience before God and man, and once they mature then they can be among the most holy and diligent servants of God.
Him that is weak in the faith receive ye, but not to doubtful disputations. For one believeth that he may eat all things: another, who is weak, eateth herbs. Let not him that eateth despise him that eateth not; and let not him which eateth not judge him that eateth: for God hath received him. Who art thou that judgest another man’s servant? to his own master he standeth or falleth. Yea, he shall be holden up: for God is able to make him stand. (Romans 14:1-4)