While this verse is talking about a specific situation, the truth that the joy of the Lord is our strength stays true. Yes, we can grieve, but we don't stay there. We lean on God's strength.
The people in Nehemiah’s time had just heard God’s Word, and were moved to repentance. Yet they were encouraged to rejoice because their renewed obedience to God brought joy and restoration.