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?
My mom died of cancer when I was really young. I'm not someone who tries to work out their own stuff with a role but I think that happened despite my best efforts to keep myself separate from it.