Obviously get your foot sorted!
If you are then deemed safe to drive maybe you could.do what helped mea lot when I lost confidence.
I think a lot of.my problems came.down to stress, which was not caused by driving but other things
I had a couple of hours lesson on motorway driving from someone who was in experienced with nervous drivers. Now at the time I was actually on beta blockers and they took the edge off the panic. But it wasn't just that, it was having someone next to me encouraging me and helping my me doing the things that made me so nervous, actually getting into the motorway
I did have a relapse after a couple.of years, but have pulled myself back and am getting more confident. If I can avoid big dual carriageway with complicated junctions, I'll do so, there is no shame in doing that
Since I have been put on meds for high BP I am more relaxed, maybe the nervousness and panic were actually caused by the high BP
But do have a go with a lesson or so, before you decide to give up. If anyone is happy driving locally on familiar roads, and they don't want to go further, again, that's absolutely fine. Most of my car journeys nowadays are local, it makes such a difference being able to drive locally, a quarter hour drive to my daughters costs £16 at least in a taxi, even with the cost of petrol, it makes it more affordable. If I'm going a long distance, I usually use.public transport, I don't have the cost of the fuel etc, I can relax for 4 hours, or however long, read, knit, go for.a wee, enjoy the view, chat to fellow passengers if they are feeling sociable.