The mind is an emergent property of brain tissue, but that's all it is. To a materialist life is nothing but a complex self-sustaining pattern, easily disrupted and gone when destroyed. All the atoms which made up the painting still exist, but the image itself on the painting is gone. Equally, when a person dies all that happens is that the pattern of their life is gone, replaced by another one. When you blow out a flame, it's just gone.
Life is a very complex flame.
Thus says the materialist. It is true that this can lead to fatalism, but usually doesn't. Absent some overriding deity to proclaim what we should do, we're on our own to find something. It is true that a materialist believes that in the long run none of it matters. Something doesn't have to be permanent to be good.