Jesus had His share of difficult people to interact with in His life.  Some scorned Him, some persecuted Him, some scoffed at Him and others just neglected or ignored Him.  He had people yelling at Him, spitting on Him, arguing with Him, trying to trap Him, and trying to kill Him.
Every one of us will have difficult people to interact with throughout our lives.  They may seem ungodly, mean, cruel, annoying, and evil.  Here are a few principles the Bible has to say about difficult people that have helped me:
John 8:7 "Let him who is without sin cast the first stone"
The most important thing I’ve learned about difficult people is that I’m one of them!
Other people may be sinful, difficult and selfish toward me... but I have exactly the same flesh as them and I'm just as guilty.  I’ve experienced that the more clearly I see how difficult, selfish, and sinful I myself have been toward my Perfect Father in Heaven, the easier it is to have mercy and patience toward other people who sin against me.  A Pharisee is one who looks down on others in frustration, but a Christian is one who is mostly frustrated and fed up with themselves and their own sin (Luke 18:9-13).  The kingdom of God belongs not to people who are fed up with difficult co-workers, evil government, selfish family, bad churches, or lukewarm Christians.  It belongs to people who are fed up with themselves!  These are the “poor” in spirit who come to the Lord like poor beggars and say “Lord, I’m the one who needs help, I’m just a poor sinful beggar, forgive me and help me!”
“Blessed are the poor in spirit, for theirs is the kingdom of Heaven.” (Matthew 5:3)
Another important principle I see the Bible teaching me is to love difficult people, no matter how they treat me in return:
Matthew 5:44 "Love your enemies and pray for those who persecute you."
Romans 2:2 "The kindness of God leads you to repentance."
I once heard a story: Early one morning the wind challenged the sun to a competition.  There was a man walking along the road with his coat on and the wind told the sun 'I think I can get that man to remove his coat before you can.'  The sun agreed to play the game.  The wind said he'd go first.  The wind blew and blew as hard as it could, and the harder he blew, the tighter the man held his coat.  Then the sun said, 'ok now let me try.'  So the sun raised himself up in the sky and shined just a little bit, and in a short amount of time, the man gently removed his coat.  The moral of the story is that it's better to warm a person with love, rather than to try to blow them around and control them with anger and force.
Is our Father in Heaven like the wind or the sun?  The Bible says that it's God's love that has caused us to love Him (1 John 4:19), and His kindness that has caused us to repent (Romans 2:2).  I believe we'll see that principle in our life as well when dealing with others.  Loving others diligently and selflessly is the way to bring unity and agreement into relationships rather than fighting with them and trying to force them to agree with us or treat us right.
Many times love won’t change an enemy’s heart toward us right away (and maybe never), but that’s ok.  If we continue to love our enemies and the unrepentant people who sin against us we can have the privilege of being like our Father in Heaven, because that’s how He is – He is immensely patient and loving even toward evil people who still consider Him their enemy:
Matthew 5:44-45 “But I say to you, love your enemies and pray for those who persecute you, so that you may be sons of your Father who is in heaven; for He causes His sun to rise on the evil and the good, and sends rain on the righteous and the unrighteous”
A son is someone who is just like his Dad.  Jesus said to love our enemies, and in that way we can be sons of our Father who is in Heaven.
Proverbs 15:1 "A gentle answer turns away wrath."
The tongue is a powerful thing.  “The tongue is a small part of the body, and yet it boasts of great things. See how great a forest is set aflame by such a small fire!” (James 3:5).
By it wars are started and ended.  Even better, wars are prevented!  The Bible says that instead of answering anger for anger, wrath with wrath, it’s best to give gentle words and gentle answers in return to a wrathful person.  This is the best way to peace.  God does not desire fighters (returning evil words for evil words), but peacemakers (Matt 5:9).  We can be a peacemaker by responding to the wrath of others with gentle words.
Proverbs 17:13-14 “He who returns evil for good, Evil will not depart from his house. The beginning of strife is like letting out water, So abandon the quarrel before it breaks out.”