Happy belated birthday and it sounds like you reacted as best you could, figured out what had happened and dealt with it calmly but quickly. As a cave/tech diver, I've done plenty of solo cave dives, and always remembered what had been drilled into my head (and muscle memory) countless times about calm (as best possible) self rescue when and as needed. And I've had to do it a time or two.
Two thoughts come to mind here to me: I've always practiced partially taking my tanks on and off underwater as part of my emergency valve shut-off drills which I usually do during deco or safety stops. Doing this makes for a much quicker and hopefully more relaxed time of doing it when you have to.
Also, some of us get chided for checking things over and over, like making sure our house and car doors are locked, stove's off, lights are off, or on as the case may be. With diving, being one of these type people of always checking things a few times or more, is actually a good thing, and I do it every time before diving no matter what. When I realize I'm moving too fast during set-up or final gear check before splashing, I'll stop myself, or slow myself down to make sure everything's covered. And I do this too if at a dive site and people come up and start chatting, asking me about my gear, what am I going to see down in that cave, etc. I'll just stop what I'm doing and talk to them for a bit before resuming. I just want to make sure I don't skip over any important thing. So don't be afraid or bashful about taking control of your gear checks or someone saying you're being "anal," etc.
Two thoughts come to mind here to me: I've always practiced partially taking my tanks on and off underwater as part of my emergency valve shut-off drills which I usually do during deco or safety stops. Doing this makes for a much quicker and hopefully more relaxed time of doing it when you have to.
Also, some of us get chided for checking things over and over, like making sure our house and car doors are locked, stove's off, lights are off, or on as the case may be. With diving, being one of these type people of always checking things a few times or more, is actually a good thing, and I do it every time before diving no matter what. When I realize I'm moving too fast during set-up or final gear check before splashing, I'll stop myself, or slow myself down to make sure everything's covered. And I do this too if at a dive site and people come up and start chatting, asking me about my gear, what am I going to see down in that cave, etc. I'll just stop what I'm doing and talk to them for a bit before resuming. I just want to make sure I don't skip over any important thing. So don't be afraid or bashful about taking control of your gear checks or someone saying you're being "anal," etc.