In the name of Allah The Merciful The Compassionate
The relation between our deeds and the Arrival of Imam Mahdi(aj):
Mankind is one of the factors in the world that actually his existence is related to the whole world which the world's goodness and corruption are somehow related to him. (Almizan 15.p64)
"ظهر الفساد فی البر والبحر بما کسبت ایدی الناس"
“Corruption has appeared throughout the land and sea by [reason of] what the hands of people have earned so He may let them taste part of [the consequence of] what they have done that perhaps they will return [to righteousness].” (Ar-Rum: 41)
In fact we make the world's events through blessings (the Arrival of Imam Mahdi aj) or disasters ( the longitude of his Arrival).
Bad morals (sins) causes the blessing deprivation, disaster's reveal, religious destruction, success's deprivation, oppressor's dominant, contagious disease, life shortness, famine and etc...but in reverse, good manner, behavior and morality make human's will in God's path, merci and blessing will arise (the Arrival of Imam Mahdi aj) specially if good manners become rampant in society (with the promotion of good preach and prevention of sins)
ولو ان اهل القری آمنوا واتقوا لفتحنا علیهم برکات من السما والارض (اعراف 96)
“And if only the people of the cities had believed and feared Allah, We would have opened upon them blessings from the heaven and the earth;." (Al-Ar’af: 96)
With repentance and improvment of deeds, we would change the ruins of the world to its glory (the Arrival of Imam Mahdi aj) inshaalah.
(God hasten his arrival) اللهم عجل لولیک الفرج