Notice Moses was content. This was probably the best part of Moses' life. He was in the wilderness for forty years. He did not have anything to do but raise a family and watch sheep and goats. I think he learned an awful lot of humility. I think he learned what his place was in the world. Though he had been given a great gift of God and had been really handpicked—he knew it—to be the deliverer of Israel, but he knew that he had really messed up.
I think that humbled him, and God made him dwell on his failure for forty years. It was not a dwelling on failure that ended in moroseness or any kind of depression. It was the kind of dwelling on it that made him a better man. In says in Numbers 12 that he was the meekest man that ever lived on the earth. He learned his place. He learned how to deal with things. That sojourn in the wilderness gave him time to reflect and to really come to understand more of what God was all about, and what God had made of his life. He had to learn how he had trashed all of that in one outburst of wrath, and then he would have to just wait until God worked it out.