A bad person is one whose behavior does not correspond to the norms of morality, and the life principles are those that you follow. In everyday life, you can avoid communicating with such people, but what if you have to work with them in the same team or meet in public places?
It is worth considering why you think the person is bad. Perhaps he characterizes you in the same way? The discrepancy between views does not mean that he is guided by selfish or base interests. Perhaps you are a maximalist or you demand the impossible from him. Analyze your attitude and make sure that the assessment is correct before giving up on the person.
If you think a person at work is a bad person, it can greatly affect the work process, especially if you cannot not communicate with him. You will be annoyed by his presence, and every remark, even made on the case, you will take with hostility. This cannot but reflect negatively on the atmosphere in the team and on the performance of tasks. No one needs quarrels and squabbles that interfere with quiet work.
Try to find excuses for his bad behavior. Imagine that in his life there were no good educated people who would instill in him the concepts of good and evil, teach him decency. This will make you treat the person with condescending pity, and your communication will become more constructive.
When you are annoyed and resentful about the bad behavior of the person you are working with, try talking to them in a relaxed way and explaining what you find unacceptable. You should not try to re-educate him - it is not in your power. He is what he is. Ask him to contact you only for work and limit communication exclusively to business contacts.
When meeting bad people, don't be like them. Do not use their own methods in the fight against them - gossip, intrigue, slander. Do not respond with rudeness to rudeness. Deep down, a bad person, of course, feels that his actions are wrong, and his thoughts are black, so he often behaves defiantly. Your strength is in your calmness, smile, keep silent and step back, showing that you do not consider communication possible. It works stronger than any words.