I'm a 19 y/o guy and I just wanted to say you're not alone with this. I've never wet myself or anything so I don't really know where it came from, but I used to get anxious about this. I'd ALWAYS have to go to the toilet before leaving the house even if I'd just been 5 minutes ago, I'd think about it a lot at school. I'd always go to the toilet every break even if I didn't need it, just to be sure. I'd do the same thing when out in public, I'd always visit the toilet when the opportunity came up even if I didn't need it (which has ended up being embarrassing - standing at a urinal with a queue of people behind me trying to pee for a minute but nothing came out because I just didn't need to go
)
I found that, just like with other anxiety, it got better as I exposed myself to the situation and also through therapy. I never once mentioned toilet anxiety to my GP or my therapist, but I was getting therapy for social anxiety. I found that as I became more confident all anxiety started to go away, including this. I also got a bit braver and started to put myself in the situation that scared me - I just started not going to the toilet before going out if I wasn't going to be out for a long time, and built up to longer and longer times.
I know it's hard, because even though you know it's irrational it's still a real fear. Try to overcome it - you
know deep down that nothing's going to happen, so try skipping going to the toilet if you're going out and you won't be out long. It's scary at first, but as you do it more it becomes normal and the anxiety should start to go away.
As others have said, I also think you should see your GP. Honestly, they deal with much worse than this on a daily basis, it's their job
They won't judge you or think anything of it, it's actually not that uncommon so they might have even had patients with it before. I know it's embarrassing so it's scary opening up to someone about it, but if you can do that it'll make getting better much easier! They should also be able to help with your other anxiety. It can make a huge difference having someone that knows what you're going through and that can support you through it.
Hope this helps, let me know if you want to talk more about it.