What do a nagging toothache, a persistent bad smell, and a person with a toxic attitude have in common? For one, they make daily life pretty miserable.
Maintain your positive outlook and compassionate nature.
Being around someone who consistently insults others, gossips, initiates arguments, and complains can be contagious. This is part of what makes such behavior toxic. This person's behavior has a detrimental effect on others in their vicinity. So, try your best to maintain your positive outlook and compassionate nature. Fight the urge to imitate any aspect of their behavior.
One way to avoid being needlessly impacted by a toxic colleague's attitude is to only be in their presence when absolutely necessary. Avoid spending downtime with them, eating lunch with them, friending them on social media, or giving them access to your personal home number and email address. While you must engage with them at work regarding projects or tasks, there's no reason to do so outside of working hours.
They may have issues, but you're not their enabler