AUC will not help you determine how to choose a loss function. AUC can help you to choose between different classifiers irrespective of a decision threshold (e.g., IF p > 0.3 THEN "spam") but it will not help you minimize losses because you haven't defined the nature of those losses. My first question is this:
- are you choosing between classifiers (models), or have you already selected a model and need to use the output of that model to make a decision?
The whole point of a loss function is that the most accurate discrimination may not be most 'cost'-effective. In other words, if false positives are expensive but false negatives are cheap, then you MIGHT NOT WANT a model that makes the fewest errors.
You say that false negatives (spam gets labelled as "not-spam") are not costly but that false positives are (not-spam gets labelled as "spam"). In this case, you probably want a relatively conservative model, that only labels something as "spam" when there is strong evidence (e.g., high probability).
Ultimately a loss function isn't something you extract from your training data. The data you use to train a classifier will probably not help you determine the relative costs of mistakes--that part needs to come from your knowledge about the use case/application/etc.
Can you take your question a bit further and describe how costly those alternatives are, relative to one another?