Erwin W. Lutzer said this quote

Thanksgiving for God’s faithfulness in our pain is the indisputable proof that we believe God is a part of our pain.