To elaborate a bit, from a modern perspective the mandate of heaven seems very transparently self serving for a newly successful regime, to the extent it might be a convenient fiction rather than a sincere belief. But its hard to accurately assess the beliefs of past societies
Was the idea of the "Mandate of Heaven" in Imperial China are common and strongly held belief?
Yes. The concept of the "Mandate of Heaven" was a very important legitimization device that was employed by all imperial dynasties. From Yuri Pines, The Everlasting Empire, page 13:
From the very beginning, the success of Zhou rule derived not only from the dynasty’s administrative and military prowess, but also from its peculiar legitmating devices. The Zhou kings succeeded in positioning themselves as exclusive mediators between the supreme deity, Heaven, and the people below; and in their capacity as “Sons of Heaven” (tianzi) they continued to enjoy obvious superiority over their allies and subordinates, the regional lords (zhuhou).
How were the Zhou rulers able to become Sons of Heaven? Because Heaven had given them its Mandate. This concept was later absorbed into Confucianism, which became the governing philosophy from the Han dynasty onwards. To quote Mencius (translation by James Legge):
Mencius said, 'When right government prevails in the kingdom, princes of little virtue are submissive to those of great, and those of little worth to those of great. When bad government prevails in the kingdom, princes of small power are submissive to those of great, and the weak to the strong. Both these cases are the rule of Heaven. They who accord with Heaven are preserved, and they who rebel against Heaven perish. The duke Jing of Qi said, "Not to be able to command others, and at the same time to refuse to receive their commands, is to cut one's self off from all intercourse with others." His tears flowed forth while he gave his daughter to be married to the prince of Wu.
In The Essentials on Statecraft of the Zhenguan Reign, Tang Taizong and his official Wei Zheng had the following conversation:
太宗謂侍臣曰「。。。天子者,有道則人推而為主,無道則人棄而不用,誠可畏也。」魏徵對曰:「自古失國之主,皆為居安忘危,處治忘亂,所以不能長久。今陛下富有四海,內外清晏,能留心治道,常臨深履薄,國家歷數,自然靈長。臣又聞古語云:『君,舟也;人,水也。水能載舟,亦能覆舟。』陛下以為可畏,誠如聖旨。」
Taizong said to his attendant ministers: "...As for the Son of Heaven, if he has the Way, then the people will push for him to become the ruler. [If he] does not have the Way, then the people will abandon him. [The people] are truly formidable." Wei Zheng replied and said: "Since ancient times, the rulers who have lost their states all forgot danger and disorder during times of peace, so they were unable to rule for long. Today Your Majesty has the Four Seas [under your control], there is peace inside and outside [the empire], [yet Your Majesty] still pays attention to statecraft and acts with caution, the nation will naturally last for a long time. I have also heard the ancient saying 'the ruler is the boat and the people is the water. The water can keep the boat afloat but can also capsize it.' Your Majesty's belief that [the power of the people] is formidable is truly wise."
Taizong also said:
「秦始皇平六國,隋煬帝富有四海,既驕且逸,一朝而敗,吾亦何得自驕也?」
"The first Emperor of Qin pacified the Six Kingdoms, Emperor Yang of Sui controlled the Four Seas, yet [both] were arrogant and indulged in leisure. [As a result] their dynasties were short lived. How can I also be arrogant?"
Such a belief that the people will rise up when the ruler lost the Way of Heaven was ingrained within the ruling circles, and this is why rebellions and regime changes were almost always justified as one party having "lost" the Mandate of Heaven through misrule, abuses, etc.
And/or was it mainly used retroactively?
A concept like this can be used whenever it was deemed necessary - declaring a rebellion, justifying a rebellion, after a rebellion. Zhu Yuanzhang, for example, issued an edict in 1367 to his troops as they prepared for a final northern expedition in which he first affirmed the Yuan as a legitimate dynasty and then proceeded to list why the Yuan had lost the Mandate of Heaven and why the Mandate of Heaven was transferred to him. He makes very specific references to the "Mandate of Heaven" and "Heaven's Will." This was before the Ming was even established, let alone unified the entire country. In this case it was not used retroactively but in order to justify military action against a rival yet legitimate dynasty.