First of all when we are calling on the river, our goal is not to win. Our goal is only to win often enough. If we are facing a half pot bet, we need to win 1 out of 4. If we are facing a full pot bet, we need to win 1 out of 3. If we are facing a 10% pot bet, we need to win 1 out of 12. So its not like, its a big failure, if we call and lose. This is fully expected, and if we always fold, we also lose, just less at a time.
With that being said try to be honest with yourself about, weather you actually thought, your opponent was bluffing, or if you just wanted him to be bluffing, because you got married to your hand. If the latter is the case, then you are making bad calls, and this is something, which require discipline to overcome.