You burn calories when any organ in your body works and breaks down macronutrients (glucose, fat or protein) into energy.
You can significantly increase burning calories (in terms of weight loss) only by increasing the use of the skeletal muscles.
Coffee (or anxiety) can increase your heart rate, so your heart muscle will burn few more calories, but your skeletal muscles will not if you are just sitting, so drinking coffee will not really result in any body fat loss (PubMed, 1992).
Example:
- A 155 lbs (70 kg) person running 7 mph (11.2 km/h) can burn 809 Calories per hour (Wisconsin.gov).
- An average adult heart muscle at rest, let's say beating at 60/min, burns 6 Calories per hour (estimated from this PubMed article). I can't calculate how much calories the heart would burn when beating at 120/min, but it would be on a similar low level.
Thinking the other way around: Can you estimate the calories burnt by knowing your heart rate during physical exercise? Well, there are calculators for that, but they are very unreliable, because the heart rate at the same physical effort can differ greatly from person to person.
Anyway, I hope it's now clear there is a big difference in the amount of calories burnt due to physical exercise and due to heart being excited from coffee or anxiety.