In Shmuel Bet, Perek 12, pesukim 1-7, Dovid and Natan are speaking and Dovid tells Natan this man who stole the sheep deserves death and Natan says, this man is you! When listening to a shiur, the speaker mentioned that there are sources that say this is going to happen when we die. Hashem will show us events from our lives and we will have to judge them not knowing that this is our own life we are judging. Where and what is this source? The speaker mentioned it was from the Baalei Hamusssar. Thank you!
The Baal Shem Tov said that. See:
The Baal Shem Tov says that this dialogue between Dovid HaMelech and Nosson HaNovi is exactly how it will happen to each of us in the World of Truth. We will come before the Heavenly Court and we will be given a ‘hypothetical case’ to judge. We will be told “There was this person and he did such and such. He desecrated G-d’s Name; He was not honest; and so forth. What is his fate?” We will show righteous indignation and offer all the appropriate condemnation of such a person. We will proclaim him deserving of harsh punishment. And then we will be shown that we, in fact, committed all of these sins and that we just declared our own fate.