In modern terms, Buddhism defines dukkha as a state of mind that is in conflict between "is" and "should". The logical opposite of dukkha is a state of peace and harmony with no such conflict.
The conflict between "is" and "should" can be resolved in one of three ways:
- By changing the "is" (acting externally)
- By changing our perception of "is" (acting internally)
- By changing our idea of "should" (acting internally)
Now, when it comes to acting (whether internally or externally) all our actions and choices can be broadly classified in two types:
- Those that lead to eventual peace and harmony.
- Those that explicitly or implicitly provoke / sustain the state of unsatisfaction and cyclic pursuit.
When you feel hunger, would suppressing the hunger lead to peace (of health) or to unsatisfaction (of sickness)? It depends on your dietary condition, of course. If you are overweight, abstaining from food intake may have a positive effect on your overall health. Alternatively, would acting externally to obtain food lead to peace or would it lead to trouble? It depends on how you obtain food, doesn't it? If you steal it, it would lead to short-term peace but long-term suffering.
This is the basic formula of Buddhist karma.
What's called "attachment" in Buddhism refers to a mistaken idea about either the "is" side or about the "should" side, due to some sort of misinformation or overgeneralization. For example, in case of hunger, attachment could be an invalid idea about priorities. You could be mistakenly prioritizing feeling of cheap satisfaction from eating pastries or fast food over genuine goodness of healthy diet. Or, on the opposite end of spectrum, it could be an invalid idea about spirituality vis-a-vis fasting - that extreme fasting leads to spiritual breakthroughs etc. In short, attachment is always some kind of irrational idea the person is stuck on.
Like, when you're in love and the person is irreturnably gone, an irrational idea (attachment) would be to keep wanting the person back. Or as you get old an irrational idea (attachment) would be to keep wanting to stay young. That kind of stuff.
Why do we get stuck on irrational ideas? Because they carry emotional significance to us. They bring us a (fake) sense of comfort. They help us sustain a comfortable image of ourselves (Ego) and its mirror projection, comfortable image of the World. So in a way, attachment to irrational ideas is a primitive coping mechanism against dukkha, just not a very efficient one. Sooner or later, reality gives us a wake up call, and then we get hit by dukkha really hard. So holding on to attachments, to illusions, to an idealized image of self (ego), to generalizations about the world is definitely something that long-term leads to eventual suffering, not to peace.
Understanding this in practice was a big part of my own training back when I started. In Mahayana we are taught to prioritize the Global Good over individual gratification. From this perspective, any idea that we hold on to, out of a subconscious desire to protect our ego, as opposed to it being objectively-strategically-globally good, is considered an attachment.
So the rule of thumb for recognizing attachments is to ask yourself the following questions:
- Will this lead to long-term good (peace, health, harmony) for myself and others? Or will it serve to sustain conflict, pursuit, and passions?
- Is this truly objectively so or am I being biased because of subconscious desire to protect my ego or my generalizations?
- Even if both 1 and 2 are true, what is my primary motivator? If it looks like it's genuinely good, but the reason I'm doing it is to congratulate myself on being holy and awesome, then it still counts as an attachment.
You have to question yourself really hard, especially regarding #2 and 3 - because the normal mind has a very strong tendency to not see its own biases.