In verse 28 He told him to encourage and strengthen Joshua, because Joshua would lead the people into the promised land. Moses could have become very bitter toward God, but verse 29 tells us that he stayed in the valley. If we continued to read the other chapters of Deuteronomy, we would find that Moses did indeed support and bless Joshua. He held no hard feelings against him or against God.
We, as children of God, have to react the same way. Maybe there is a work you would like to do for God, but someone else has been called by Him to do that work. If that happens, we have to put aside our own feelings of hurt and rejection, and support the one that God has chosen. God's will must be first in our lives at all times, in all places and circumstances. We must support those God calls for service and do whatever we can to help them.