First, we would like to stress that what you have referred to in your question is not an authentic hadith. Although Islam allows differences of opinions, it stresses the unity of the Ummah and gives it a top priority. Thus, differences of opinions should operate in a healthy framework and such differences are really capable of enriching the Muslim mind and stimulate intellectual development. They could help to expand perspectives and make us look at problems and issues in their wider and deeper ramifications, and with greater precision and thoroughness.
Dr. Muzammil H. Siddiqi, President of the Fiqh Council of North America, states: People often quote this statement as a hadith, but it is not mentioned in the six authentic collections of Hadith and its chain of narrators is also not known. There are various versions of this statement. In some versions it is mentioned, “The difference of opinions among my Companions is a mercy for you.” Or “The difference of opinions of my Companions is a mercy for my Ummah.” Many scholars of Hadith consider all these versions as weak or da’if as far as their narration is concerned.
According to the Qur’an and Sunnah, not all differences of opinions are “mercy. Some are acceptable and some are not acceptable. Some could be called “mercy” but some are “problematic, ugly and even a curse”.
Islam allows differences of opinions, but it has given us broad principles of unity and basic rules and guidelines for the differences of opinions. Not every person’s difference of opinion is good and valid. Only those who are qualified to form an opinion in any given subject are also allowed to differ according to rules of that subject. Medical doctors, for example, have a right to differ with medical doctors on medical issues. Engineers have a right to differ with engineers on engineering issues. Lawyers can differ among themselves on law issues. But one cannot say that everyone has the right to differ and everyone’s opinion is good. It is foolish for an engineer to differ with a medical doctor on a medical issue. Similarly, it is wrong for a medical doctor to give an opinion on a juristic issue of which he does not have much knowledge. A difference of opinion in such a haphazard manner is not “mercy”; it may be a “curse”. Of course we should be tolerant and we should allow the difference of opinions, but we should be also very careful in giving our opinions.
I would very much recommend that you read Dr. Taha Jabir al-`Alwani’s book The Ethics of Disagreement in Islam. It is a very valuable book.