Problem: Paul commands us here to “Rejoice in the Lord always,” but Jesus insisted that “Blessed are those who mourn” (Matt. 5:4).
Solution: Properly understood, these are not mutually exclusive. Mourning is the condition and rejoicing is the result of a proper relation to God. It is those who humble themselves whom God lifts up (cf. James 4:10). So it is those who mourn in their spirit who will be able to rejoice in their Lord. True sorrow for sin is the antecedent of the consequent joy of salvation.