When one knows that everything is from Hashem, he will be at peace with everyone. There is a mashal of someone who came home after a hard day’s work. He comes to the sink to wash his hands for supper, but no water comes out. He turns the knobs in all directions, and he bangs on the faucet until it breaks. He then looks under the sink. He opens the pipes to find the problem. Why isn't water coming through?
His wife sees him doing this, and says, "Why don't you call the water department? They are the ones who always bring us water, and they can bring you water now, too. You just need to pay the debt you owe them, and they will reconnect the water to our home." The husband thought that there was a problem with the knobs, faucet, or pipes, but the problem came from the source of the water.
The nimshal is that people are angry at this one and at that person because they think that their problems are from them. They forget that everything comes from Hashem, and there isn't reason to be angry at anyone.
This can be the meaning of the pasuk (Mishlei 16:7) אתו ישלים אויביו גם איש דרכי 'ה ברצות, "When Hashem favors a man's ways, even his enemies will make peace with him." When a person finds favor in Hashem's eyes because he attains the emunah that everything is from Hashem, he is at peace with everyone. He isn't angry at the person who spoke lashon hara about him or who took away his parnassah, and not at anyone else, because he knows that everything comes from Hashem. Ultimately, if this person didn't cause him harm, someone else would have done so.
There is another wonderful counsel from Rebbe Bunim of Pshischa zt'l, which can be used to resolve all disputes. We will be at peace with all Yidden if we follow this counsel. The counsel is: (1) Focus on your fellow man's qualities. (2) Think about your own faults.
Your fellow man has many qualities. Perhaps you don't recognize his good side and focus on his faults but think about it a little and train yourself to find the incredible good in your fellow man.
Think about your own faults, as well. You will probably find that you lack many of the wonderful qualities that your fellow man has. Think about these matters, and you will be humble before your fellow man and at peace with him.
Yosef taught his brothers the process so there should be peace among them. He told them (42:18), ירא אני האלקים את וחיו עשו זאת, “Do this and live, I fear Hashem." Yosef told them to focus on the fact that he has Yiras Shamayim. Yosef's brothers thought about their faults, as it states (42:21), אנחנו אשמים אבל אחינו על, "We are guilty of what we did to our brother..." They had two thoughts that led to peace. They thought about Yosef's qualities and their own faults, and this helped them respect and be b’shalom with their fellow man.
It states (42:20), כן ויעשו, "They did so." Rebbe Bunim explains that they followed Yosef's counsel to focus on his greatness (and on their faults), and thereby, they were able to be at peace with him.
