In that case it is in the imperative, not the subjunctive. The imperative is for orders and instructions and so forth; you can tell it is in the imperative because it has no subject. The subjunctive is either used when reporting orders (E.g. He asked that I do it) or in conditionals (E.g. If I were rich....)
In practice, it's an interjection, not really an imperative, in most situations. At least, the ones that are appropriate to talk about here. Simply a far ruder way to say "Well, what an unforunate surprise!"
mind you, the mood of the interjection is still the imperative. That might not be the function of the phrase, but that is how it is constructed. Because interjection is not a mood, saying that it is an interjection wouldn't seem to answer the question.