Well if the afterlife is terrible, you're going to end up there at some point anyway. So unless your religion says that suicides are punished, I don't quite see the argument.
Pascal's Wager can be used as an argument against any practice that some religion frowns upon, for that matter. If you accept his argument (I stopped doing that many years ago).
EDIT: and though we, in this realm, have no definite knowledge of what the Afterlife (if any) is, there is no guarantee in the Afterlife. So maybe you'll end up betting on Pascal's Wager through all such realities, indefinitely. And who's to say that, even if you have a wider and "higher" perspective, that you can ever be sure of the true nature of reality, and that there is nothing "above"?