There is a big difference between 'rejoicing in the Lord' and 'rejoicing in ones commitment to the Lord'. As the Apostle Paul wrote these words to the Philippians, he was imprisoned. He was suffering for the sake of Jesus. Amidst his sufferings, the Apostle is overjoyed. You could say he was suffering well. Paul suffered as to make Jesus look supremely valuable. He was doing a great work in his unceasing commitment to the Gospel, even in jail.
Yet, the Apostle Paul's rejoice is not in his commitment to the Lord, but in the Lord's commitment to him. There is a big difference. When I'm doing well, my tendency is to rejoice in my commitment to God. To say, "God, I'm thankful and I rejoice that I'm so committed to you, unlike these other people". If you want a perfect example of rejoicing in one's commitment to the Lord, go to Luke 18:11. Rejoicing in our commitment to God stems from and produces insecurity, pride and self-righteousness. When we don't truly believe that our standing as sons of God is secure because of what Jesus already accomplished, we begin to think that if we are really committed, then we will be secure with God. So, when we are committed, or do well, the insecure person rejoices because they think it merits them something. It proves to God how committed to Him they really are. Ultimately, it's focus is on what we have done for God. On the other hand, rejoicing in the Lord produces humble confidence, and focuses on what God has done for us.
So, when we do well, like the Apostle Paul was doing in his suffering, let us join him in 'Rejoicing in the Lord' and not 'rejoicing in our unwavering commitment to God'. In the end, what we have to offer God isn't worthy. All we have is what He gives. We have nothing to give Him which He doesn't already rightly deserve. Therefore, whether moments of great weakness or great strength, let's rejoice in the Lord. Let's rejoice in the unwavering commitment God has shown to such pitiful men. Let's rejoice in God's unchanging, fatherly love for His children, which He has lavished upon us through our Lord Jesus Christ.