What do you tell to someone who's decided that it's really quite pointless to continue working and living because the inevitable fate of the Universe coupled with the seeming inability to achieve sustained happiness?
To them living to make a difference is pointless because practically nothing survives Solar death, and nothing survives a maximizing of Universal entropy.
To them living for themselves is pointless because nothing brings sustained happiness. Solving problems, building things, etc. are just as much drugs as heroin. Once you've solved the problem you start seeking a new one. You can't be happy and satisfied with solving an important problem once.
If they exhibit serious catatonic symptoms, you take them to the doctor immediately. Otherwise, you explain to them that whoever promised them that life has a meaning on its own was lying to them in the first place, and that people have to make life meaningful by themselves, and then to read some existentialists, Nietzsche, Schopenhauer or Camus.
Death is just as pointless. Considering that you have all of eternity to be dead, it seems like a mistake to cut your brief life short, in case something changes in your perspective during the rest of it.
You don't "be dead", its not an active state, an ongoing experience.
You imply that the person would miss out and regret it, but they woudn't be missing out because they wouldn't be.
Suicidal people reading this and thinking I'm arguing in favour of it stop right there - I'm on a phone and can't write a full nuanced answer. But I think this is an important point which all the "permanent solution to a temporary problem" people don't really consider, and should, to see why its an inneffective exhirtation.