I do not sit with the worthless or associate with hypocrites. I hate a crowd of evildoers, and I do not sit with the wicked. I wash my hands in innocence and go around Your altar, Lord, raising my voice in thanksgiving and telling about Your wonderful works. (Psalm 26:4-7)
People might use these verses to justify haughtiness, judgment, or isolation, but these verses also contain thanksgiving. Claims in these verses are only in the context of our humble relationship with and dependence on God. We take our frustration to Him. Yes, it involves other people, but we only isolate ourselves from others in the context of drawing closer to God. In my experience, that often eventually concerns attempting to draw closer to others as well, as He directs. Even when we don’t understand, we can be thankful for whatever ways He guides and trust His wonderful works.