Don't stand there for a long time beforehand. You know whether you're going to go or not. Once you know you aren't going to go, walk up, shake it off, refocus and try again. I've never stood there for like 2 minutes and then actually gone (this was usually a problem with series for me, at some point I knew I was only going to do the BHS, or I was going to do a tuck instead of a layout, or whatever. So it was kind of dumb. I definitely had to work to stay out of the mindset of, I can just stand here, give up, and change my mind). I did lose my standing BT once (already had it at that point) and it was basically like what you describe. I would stand there, paralyzed, knowing I wasn't going to go. But here's the thing, my coach would say, stay there until you do five (as in on the event, not on a specific beam), and I would just stand there on high beam knowing I wasn't going to go until I started crying. That's really not productive
It would be better to get down, do it on line, low beam, work it up, whatever, because every time you lack the confidence to do it and then go stand there anyway in a half-hearted "I know I'm not ready" kind of attempt, you reinforce the fear in your mind and make it that much harder to get over next time.
I kind of had an issue earlier this year with some beam stuff (including BT!!) after taking some time off, and I waited until I knew I would do it to prep for it on high beam. I always do this swing tuck jump land thing as a lead up so I kind of know then whether I'm going to do it or not. But the best advice I ever got on beam (this was for FWOs, but it helped me on BHS series too) was "the beam will be there." Just think about that. The beam's not going anywhere. You know where it is. You're fine.