I've had something similar, although by the time I got to the GP the next day everything was normal (he checked BP and did an ECG). Some viruses just elevate your heart rate enough that you hit MHR when you wouldn't normally, and hitting MHR, and I mean *maximum* heart rate, is never pleasant. If it happens to you, either keep going slowly or get off the bike and lie on the ground. If you just get off and stand there, like I did, you'll probably faint as the blood pools in your legs, and faints are never good because you tend to crack your head.
The weird thing was the way consciousness came back - everything was black, but I got to my feet (back of head very sore from hitting the pavement). A passer-by asked if I was OK and I said yes, but I couldn't see anything. Then the streetlights started to pop into view, then his silhouette, then his face. Apparently 40% of the brain's oxygen uptake is just to run the visual system, so it's the first thing to go and the last thing to come back if there's not enough blood.