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?
Young man the secret of my success is that an early age I discovered that I was not God.