Whatever our circumstances we must turn to God for wisdom. It can seem to be a paradoxical wisdom that the poor must focus on how rich they are in Christ and the rich must remember how spiritually poor they are.
To those who experience poverty: rejoice in the Lord and rise above the circumstances. Remember your identity; we are made in the image of God. Don't base worth in wealth, that is not what Jesus does. Resist the temptation to sin to get ahead, obedience brings honour and glory to God. We gain wisdom/compassion by meeting new people in a way we might not have otherwise even in "bad" situations.
To those who are rich: do not define yourself by a wealth that won't save you; riches don't buy righteousness. Demonstrate humility and generosity. Know that earthly riches are temporary and while you have it act in a way that will bring glory to the one it truly belongs.