I think a more appropriate question would be “How do I avoid judgmental and closed minded people”. If someone ridicules you for your beliefs, then it is more of problem with their psychology and personality. You should be allowed to be a person of faith.
I used to be a christian and I still have many christian friends and it comes down to the fact that we still enjoy each other’s company and character. I also know many Christians and atheists that I want nothing to do with.
Just avoid jerks. There are plenty of them no matter what they believe or don’t believe.