Religion can make it worse. Are you supposing that if people were encouraged to believe in a transcendent reality, and to be encouraged by grand rituals and music and preaching, to love their neighbors, then they would put jealousy and frustration aside?