The best way to maintain a positive outlook when faced with negative people is to stay focused on our own goals and beliefs, and cultivate a positive mindset.
So, how do we go about staying positive around negative people?

Remember that you are in charge of your attitude.
The first step in staying positive is to remember that no one can make you feel bad without your permission. If you choose to remain positive, you can do it. Do not allow yourself to fall into the trap of feeling like a victim to the other person's bad attitude – Stay strong.
Remain firm.

When someone says bad things about others, then remain firm and do not ruin your own thoughts, speech and inner peace. If they are saying things you do not agree with, you can say a couple of positive things to counterbalance the interaction.

To know more: https://www.dadabhagwan.org/path-to-happiness/self-help/positive-thinking/

Seek pardon.

In case any hurtful thought arises in our mind towards such a person, then immediately ask for forgiveness (pratikraman) as a result of which, we will feel lighter and our opinions linked to them will dissipate
.
Focus on yourself and your goals.

If all your attention is on the negative person(s), you will be more likely to be drawn into their negativity. By paying attention all know that maintaining a positive attitude has benefits on our physical and mental health, but it can be difficult to maintain a positive attitude when others around us are negative.on to what you can do to maintain your positivity, you will be more likely to create a distance between yourself and the other person. After all, you cannot change the other person, but you can change yourself.

Every living being acts based on their past life karma. So, although a person (s) may seem negative externally, they may be feeling remorseful for their actions and words internally. Therefore, do not see faults or criticise those who you think are negative people.

We become what we imagine.
When we say, “I am feeling happy”, then even if we are feeling low, we will start feeling better. But if we say, “I am down,” we shall start feeling low. We become whatever we imagine ourselves to be! Therefore, we should always say, “I am feeling happy. I am always positive.” Then you feel like what you imagine.

Chant a mantra.
Some people practice saying short mantras as a spiritual tool, while others find mantras remind them to calm down under negative situations or people. Repeating a mantra to yourself when in the presence of negative people can help you remain positive and eliminate negativity.
Limit the amount of time you spend in the company of negative people.

The final truth is that people walk into our life for a reason. It is because of our karmic bondage from our past life that this happens. Therefore, if we deal with them with equanimity i.e. without abhorrence or attachment towards them, and seek forgiveness from that person whenever we fail to do so, then the conflict or the uneasiness that we experience in the presence of that person(s) shall eventually come to an amicable closure and end.

Author's Bio: 

Ambalal M. Patel was a civil contractor by profession. In June 1958, spontaneous Self-Realization occurred within Ambalal M. Patel. From this point on, Ambalal became a Gnani Purush, and the Lord that manifest within him became known as Dada Bhagwan. A Gnani Purush is One who has realized the Self and is able help others do the same. Param Pujya Dada Bhagwan used to go from town to town and country-to-country to give satsang (spiritual discourse) and impart the knowledge of the Self, as well as knowledge of harmonious worldly interactions to everyone who came to meet him. This spiritual science, known as Akram Vignan, is the step-less path to Self-realization.