First question: I guess it doesn't really. If it helps the person somehow, such as comforting them, that's great. A definite no in that case. But like Filter was saying, it's not like believing matters or not in this regard, won't change the truth. And it's not like anyone can truly know anyways, making confidence sort of pointless from a strictly spiritual perspective. So I'd say no.-Does it matter whether you can be confident that spiritual beliefs are true, if they are beliefs that you find comforting, for example?
-Is it necessary to believe in a theistic religion if you want to believe in an afterlife?
For the second question, I also say no. The idea of an afterlife is dependent on what you believe after all. What exactly the afterlife is will depend on your specific beliefs as well.