Joshua is right to point to this one, which is relatively clear. And I think he's right to say that the test is not limited to "bodily" - unless someone is speaking in the sense that everything is "bodily" in the end - but that's not the sense being discussed as far as I can tell.
I think Torquatus makes clear and there's no reason to doubt him that mental pains and pleasures can often be more significant to us that bodily pains and pleasures.
The problem with including both bodily and mental pain, is that mental pain can arise from false views of reality. Lucretius warns about the pains that come from intense romantic infatuation. And there are other false views which can give mental pains...such as thinking that the stomach "needs" unlimited filling by variations of taste. So that means that using mental pains to determine when something is necessary doesn't always work.
And that is why I think we need a list of things that are necessary for the happiness of the soul. If you didn't have a single friend you could survive and your life would be very quiet, but you would lack a feeling of joy (joyousness/rejoicing).