I had this too and I think I had a combo of IC (painful bladder syndrome) and OAB. It's more manageable now but I still panic over certain situations like traffic jams and going to the cinema (I don't) or concerts etc where people may have to stand up to let me out for the loo.
This is what has helped me..
drinking only boiled water or bottled still mineral water or some herbal teas (no booze, fruit juices, anything fizzy, no tea or coffee- even without caffeine tea has tannin in it.)
No onions or garlic or spices (so no curry or chilli)
No acidic fruit
Very little chocolate (contains caffeine)
Reduce sugar overall in diet- aim for no more than 2 teaspoons a day
Try to hold on to allow the bladder to fill and expand, when at home.
Drink at least 1.5 - 2ltrs a day (about 6 large mugs) because strong urine irritates the bladder more.
Mine is brought on more by anxiety such as long car trips where there may be jams, or few services.
I carry a portable 'potty' which is a plastic bag with a funnel, though it's very hard to use as a woman, sitting down ('Ive practised.)
I hope some of this may help others.