Those who are merciful will be shown mercy by the Most Merciful
‘Abdullāh ibn ‘Amr (may Allah be pleased with him) reported that the Prophet (may Allah's peace and blessings be upon him) said: "Those who are merciful will be shown mercy by the Most Merciful. Be merciful to those on the earth and the One in the heaven will be merciful to you."
"Those who are merciful": those who treat the creatures of the earth with mercy, including humans and animals, by being kind and charitable to them. Since the reward is of the same kind as the deed, then, in return for their merciful treatment, Allah, the Most-Merciful, will bestow His mercy on them. "Be merciful to those on the earth": the purpose of generalization is to include all kinds of creatures upon the earth, so the Muslim is to show mercy to the righteous and the sinner alike, and to the wild animals and birds. "The One in the heaven will be merciful to you": Allah who is in the heavens will have mercy upon you.
It is not permissible to interpret the phrase "in the heavens" to mean Allah's dominion or otherwise, for, verily, Allah's elevation above His creation is established in the Qur'an, Sunnah, and the consensus of scholars. Saying that "Allah is in the heavens" does not mean that the heavens contain Him and that He is part of them - far Exalted is He above that. Rather, "in" means "above", meaning: above the heavens,elevated above all His creation.