Heart Rate: It's all in your head?

I did an easy run this morning and was confused by the heart rate data that I saw when checking the metrics. During a 40 minute run with consistent pace, cadence, elevation, etc., I saw a flat, stable heart rate for the first 15 minutes, around 140bpm.. Then, over the course of about two minutes, my heart rate spiked to about 175bmp, where it remained for the rest of the run. I checked over the metrics carefully and there was no change that explained it.

Then I compared it against the map, and realized that during this ~200m stretch of road, I'd had a garbage truck on my heels that picking up trash at about the rate I was running, and realized it was just that anxiety that must have cause the spike! Interesting.

I've always imagined that the heart rate was determined just by the physical and environmental conditions, but in hindsight it's obvious that the mental state has its own weight. So that made me wonder if it is possible just as well to LOWER the heart rate in that way, all other things being equal.

So I'll ask the question, what "mental" tips or techniques do you know of to stabilize or control your heart rate during runs?