Psalm 12 belongs to a collection of Songs of Lament (deep sorrow) for the Israelites. The people of God came before him weeping, but are encouraged afterwards because they are reminded they are in His presence.
There will be times when being a follower of God, will mean you will be a despised and persecuted minority in the culture. This has happened before, and will again. When we are willing to suffer, the Spirit of God is at work with us and we will be blessed.
What does a godly person feel when living in a society that has forgotten the Lord? We will be troubled and distressed with the demise of faith in the community. But we are called to come before God with these issues and feelings.
What happens when godliness declines? Ungodliness promotes a culture of lies and people will be shallow/superficial with each other. There will be flattery/false praise; duplicity (people will think one thing but feel forced to say another); greater boastfulness; injustice will increase.
What should God's people do? We should turn to God in prayer for help. Our strength is not in the number of people in the church, but the might of our God. We must go back to the Word of God.