@EPstar The way you ask this question kind of makes it seem that there should be a single one-size-fits-all answer, but I think there are different approaches depending on your relationship with the person you describe.
In many cases it is not your responsibility to "deal with" the person, and if interacting with them is unsuccessful then you might be able to walk away, or at least reduce your contact to the minimum.
In some other cases the person might actually be your responsibility, and you might be able to get them professional help.
I imagine there are many other cases in addition to these two.
Charlie