When you can have the thing you want, but you choose a close second, now you are left dissatisfied with the action or object.
Another way of thinking about it is, dissatisfaction caused by choosing something other than what you actually wanted.
I wanted a salad, but I chose a taco pizza, now I am feeling unsatisfied with my lunch.
I wanted to paint a blue flower, but instead, I chose to paint a purple flower, now I am unhappy with they way my painting looks.
Sublimate (divert or modify an instinctual impulse into a culturally higher or socially more acceptable activity).
-- This word feels lacking and inadequate for the complexity of the situation.