Hello Bad Heart!
Don't feel alone! Many men suffer this (I being one of them ) I call it "Stage Fright" ....and I too seem to have gotten worse latley. However I was diagnosed with an enlarged "prostate" gland here recently, which does not help matters any. Even at home I may stand there for a couple of minutes.
I am taking a med that now will relax the prostate gland, but so far I have not seen much of a change, and think I will need a med that will also shrink it.
As far as the pain med's, well...I do think it can make a difference, but you might want to see what other members have to say about it, and also consider seeing a Dr about it. It could be that you also have a Prostate problem, but as you said you have no problem at home. Sounds like "Stage Fright" to me....but I really don't know.
If it is, I believe it is a very common problem, and privacy may help, such as using a stall instead of the wall urinal. Oops!...I see you have already tried that. Maybe, thinking of something else during that time may help....and some,... turn on a water tap in an effort to stimulate the thought process.
Hope this helps!
SE