From the very moment that Yosef HaTzadik recognizes his brothers he treats them in a surprisingly harsh and seemingly unforgiving manner. Not only does Yosef unfairly accuse his brothers of spying, he further demands that Binyamin be brought to Mitzrayim. Perhaps what is most striking is his apparent lack of concern for his father Yaakov. How could Yosef remain indifferent to the anguish of Yaakov's suffering? How are we to understand the failure of Yosef to communicate and inform Yaakov that he was still alive?
When Yehudah confronts Yosef, he describes Yosef as dead, "veechav met" (Bereishis 44:20). Rashi explains that because of fear, "haya motzi davar sheker me piv", Yehudah misspoke for he could not be certain of Yosef's fate. However, the Meshech Chochmah defends yehudah's assertion. Yehudah reasoned that had Yosef been alive, he surely would have contacted his father. The Meshech Chochmah cites Rashi (Ketobos 22b) who allows a woman to definitively assert that her husband has died based on the notion that, "ilu haya kayam haya bah", if indeed he was alive he would have surely returned.
Ultimately, the Torah conveys the true compassionate character of Yosef haTzadik, as it describes his inability to restrain himself any further, and his revelation of his identity, emphasizing, "Ki lemichya shelachani elokim lifneichem", , that all that had transpired reflected yad Hashem. Yosef reiterated his true conciliatory feelings, "Elokim chashva letovah" (50:20). Hashem intended it for good.
However, the righteous and compassionate nature of Yosef further reinforces the obvious difficulty, i.e., Why did Yosef wait so long to identify himself? The Ramban explains that the answer can be found in the following pasuk, "Vayizkor Yosef et hachalomot asher chalam lahem vayomer aleihem meraglim atem" (42:9). Yosef recalled the dreams that he dreamt about them, and he said to them, "You are spies." Unlike Rashi, Who sees Yosef's brother coming to Mitzrayim as a fulfillment of these dreams, the Ramban maintains that unless Binyamin would join his brothers in Mitzrayim, the dreams would remain unfulfilled. Driven by these dreams, which Yosef considered prophecy, he surpressed his otherwise compassionate nature to ensure that Binyamin would in fact come to Mitzrayim.
The Midrash alludes to a further explanation of Yosef's behavior and objective. The grievous sin of mechiras Yosef placed an almost unbearable burden on the brothers. Rav Meyer (Sanhedrin 6b) is especially critical of Yehudah. Although he was greatly respected by his brothers he failed to exhibit responsible leadership. It was Yosef's desire to provide his brothers with an opportunity to redeem themselvesm a chance to secure complete teshuvah. Rav Yehudah explains (Yoma 86b) that the true measure of teshuvah is when an individual is faced with similar conditions to those that previously led him to sin, and he is able to overcome temptation and fulfill the ratzon Hashem. By insisting that Binyamin come to Mitzrayim and by accusing him of stealing, Yosef was able to test the true character of his brothers. Would they unite and rescue their younger brother or would they forsake him as they had abandoned Yosef? Hence, when Yehudah exhibited true leadership and mesiras nefesh by confronting Yosef and demanding Binyamin's release, Yosef immediately reveals his identity. The feelings of jealousy and enmity of the past are now replaced with feelings of compassionate brother hood.