Played guitar in the school assembly hall today as it is the last day of school. It went as bad as it could've because of the hall's awful acoustics and the relatively bad amp. Countless playthroughs to master the song, an hour of setup to play 3 minutes of crappy guitar and look like a total beginner. I'm disappointed in life. I even dreamt about it going horrible tonight.
I had to deal with a school concert hall that had unflattering acoustics for both guitar and saxophone for 7 years. I never got used to it. When I started having gigs outside of school I figured things would get easier as far as that goes, but not really. Not only are most small venues (and even a lot of big venues) unfit for live music, but you never have enough time to get used to the room and adjust sufficiently. And that can be really distracting with your playing. The good news is that typically these performances always sound worse to the performer than the audience. Go to any rock concert by an established band, chances are the sound isn't that good. I don't know if I can even remember the last time I saw a concert with good acoustics. Might've been Opeth in 2013.
Also, since you played an original tune, it probably came off a lot better than you think.
Two things that will help you with these situations:
1: Prepare for the worst. When you're practicing for something like this, try to "practice" how you will handle yourself if something goes wrong. Acoustics will suck and equipment will break down, live music can be really chaotic that way. If you run through different scenarios in your head, if something actually happens you'll be prepared and at least won't panic so you can still (somewhat) comfortably play the song.
2: Your pre show rituals can make a difference. I've had performances (especially in middle school) where I'd run around a lot and eat a ton of food before going on stage and then I had so much energy that I couldn't control my playing during the performance. Or I went through something dramatic before and I couldn't focus as a result. I'm not assuming you do any of these things (assuming you're already pretty good at this really) but what you spend your time doing before a performance really affects the actual performance. Different things will work for different people but I find it best to find a quiet space and warm up a little (not too much, you don't want to "blow your chops", to use a horn phrase), basically try to relax myself so that when I go on stage I can relax my nerves a bit. I get really bad stage anxiety so this helps a ton. But that also helps if something goes wrong, because you'll be better equipped to handle it.