I'm really quite surprised they went with nitrofurantoin. The incredible increase in resistance that has been seen around here has removed it as a first-line treatment. Typical first line treatment now is TMP-SMX (trimethoprim/sulfamethoxazole) or a cephalosporin like ceftriaxone (I probably wouldn't pick a 1st gen like cefalexin since it is known for having incomplete activity against some e. coli). The fact that the nitro caused incomplete resolution would be seen commonly now. The lack of culture is just wrong and scary. There are quite a few reasons (in addition to the one I mentioned above) why Keflex could fail, especially after an initial failure with abx therapy. I would also disagree with them classifying it as "uncomplicated". With your history of LUTS and pyelonephritis, thinking it is an "uncomplicated" case without any proof is negligent. Your history alone should have excluded nitrofurantoin as a first choice.
I just don't see the methylphenidate being the source of this. You've been taking it for some time, correct? No recent dosage changes? If so, sudden onset tachycardia to a medication you've been on and had no trouble with just doesn't happen with no change. The duration also doesn't make sense. If it was triggered by the methylphenidate, then the onset and duration of the tachycardia should match what's known as the pharmakokinetics of the medication. Pharmacokinetics is how a medication is usually metabolized, so when and how long it works for is well known as it typically doesn't vary (too) much between people.
If you do indeed have subacute lymphocytic thyroiditis, it is possible you've "flipped phases", which is known to happen. When this occurs you can actually switch from hypothyroidism to hyperthyroidism, with one of the main symptoms being palpitations and abnormal cardiac rhythms (arrhythmia). Unfortunately a bath can trigger exactly what you experienced because it also causes moist heat intolerance.
The reason you feel dizzy or faint is that when one crosses the tachycardia threshold that is the point where the heart starts to lose efficiency, and as the rate goes up, efficiency drops respectively. The reason for the efficiency drop is that the heart is beating so fast that it isn't filling up to full capacity before it tries to push the blood out, so not enough oxygenated blood is being circulated. With an insufficient amount of blood circulating suddenly your body is no longer getting the proper amount of oxygen, which starts to cause all sorts of impacts on the various organs and systems. Since the brain is our most energy intensive organ, and it requires a constant, uninterrupted supply of oxygen to work correctly, it is most impacted by a sudden lack of available oxygen to meet demand.
You'll definitely want to avoid hot baths, and showers that are hot as well. Tachycardia, due to lack of cardiac efficiency, will make one feel dizzy or faint, exposure to hot water just makes it that much worse or can possibly trigger it. When one is exposed to that kind of heat, it causes a "steal" effect where the peripheral vessels expand to try and deal with the heat, which shunts the blood into the peripheral circulation. So, the blood is shunted into the peripheral circulation, and tachycardia is causing a loss of cardiac efficiency. If they are put together, one has a situation where there is not nearly enough blood flow in central circulation. Sitting of lying down, one is generally ok, but as soon as they stand up, they will get very dizzy or faint, because the lack of proper central circulation will cause the phenomenon known as orthostatic hypotension to kick in. Normally when one stands up, the heart rate elevates slightly to compensate for the fact that the blood pressure in the central circulation is suddenly trying to drop. If one isn't experiencing tachycardia at the time, this sudden attempt to raise the BP while the blood is in the peripheral circulation can actually trigger it. However, if one is already experiencing tachycardia, any attempt to further increase the heart rate just exacerbates the problem by making the heart even more inefficient, which actually causes blood pressure to fall further. If BP drops below a given threshold, one will experience syncope, which is where the brain isn't getting enough oxygen to maintain consciousness, causing the person to black out and hit the floor. Blacking out is a bad thing, but it is the body trying to correct the sudden problem it is experiencing the only way it can. By causing the person to suddenly hit the floor the problem of low BP is corrected because the person is no longer standing, which was causing the low BP condition. The heart can stop trying to accelerate further, and as soon as the oxygen debt caused by the hypoxia in the brain is resolved, the brain brings the consciousness back online and the person wakes up, suddenly wondering why they are lying on the floor when the last thing they remember is standing up. Of course, taking a fall from blacking out is dangerous, but it's a better alternative than what would happen if the oxygen debt in the brain wasn't rapidly corrected. That's why it's just better to prevent the entire situation by avoiding hot water altogether.
If you find just standing up from lying down is enough to trigger a tachy episode due to HR acceleration to stabilize BP, the best way to avoid that is to go from lying down to sitting, wait a handful of seconds, then stand up slowly. It allows your body to adjust BP in stages instead of all at once and should hopefully prevent a tachy episode. Did they happen to tell you what was abnormal about the ECG? What it actually said or indicated is key. There are many forms of tachycardia, but an ECG capture would go a long way to determining what is going on.
It's funny you mentioned an ice pack, because ice (or ice water) can be involved in one specific way to break tachycardia. Why they haven't told you these things is beyond me, it is bog standard for them to tell anyone how to do these things that has experienced a series of tachycardic episodes. One way to break tachycardia is to put ice packs or a plastic bag of ice on your face for about 15 seconds. If that doesn't work you can immerse your face in ice cold water for several seconds. If that fails a cold bath or a cold shower might work. However, you can't spend much time in a shower or bath of cold water because your body temp will start to lower and that can trigger a reflex tachycardia as a way to try and warm you up. A different way to trigger your heart rate to drop is to activate your gag reflex. I generally recommend using a tongue depressor to do it (or a popsicle stick) . You can use your finger, just make sure to wash your hands first. The gag reflex works because it increases the tone of your vagus nerve, which will drop your heart rate. Yet another different way is to cough really hard, and keep doing it until your heart rate comes down (or it seems unreasonable to do so any longer/you get no response from it). This also increases the tone of the vagus nerve. Another thing to try is to hold your nose, close your mouth, and try to force the air out (it's the trick ENT's teach people to clear their eustachian tubes when they are clogged). It also will increase your vagus nerve tone. The very last thing to try, because it is the most difficult, is carotid massage. Make sure you are lying down for this one since it can cause your BP to suddenly drop. You need to find your carotid pulse (the pulse in your neck), once you can do that, trace it in essentially a straight line to your jaw, then go back down that line about an inch. You should still be able to feel your pulse strongly at that spot. This is where your carotid sinus most likely is. You want to firmly massage that area, only on one side. If you're in the right spot, it should strongly influence your vagus nerve and cause your HR to drop.
Despite being an American, without PLing, I am fairly familiar with the NHS system, but it was a few years ago. Though, I still have a number of colleagues/friends who are part of the Bri*ish medical community. I knew there were cutbacks, but I had no idea it was this bad. I mean, the NHS wasn't great back then, but it sounds downright criminal now, in an almost literal sense. I don't know how they can get away with treating patients like this. Have the cutbacks gotten precipitously worse due to COVID? Unfortunately I haven't been able to keep up nearly as as well as I would have liked the last few years.