panic attacks are normal when you do things at the spur of the moment, knowing it feels right at the time, but not having thought it through completely. suddenly thought strikes and asks you, was this really the right thing to do?
but if it felt right to do it, just breathe in, and relax. the world doesn't end, neither does your life. you're still young, making a mistake (if it turns out to be that) isn't humiliating in any way, though it can be amusing to others. even yourself when you grow older. i'm not many years older, but i'm already laughing at silly mistakes i did when i was your age.
a name can be changed many times. you've just come out, and given others a different name to use, one that represents you better. it won't be too difficult to say later that, sorry, that name doesn't sound right, so i'm making the official name change to Y instead.
and facebook is just facebook. some people seem to think it's their life, but it's not. fb is really just some social media where people lie all the time, attack or offend others for fun, and all kinds of things that they'd never do or say in real life. they do say that if it's not on the internet, then it doesn't exist. but that doesn't mean that everything on the internet is real. you are still you, the name change just a detail. some might want to tease you about it, your mother will likely want to criticize you a little more for it, but i doubt anyone wants to truly humiliate or attack you for it. that would be too troublesome.
so just relax. if you find out it wasn't the right time, you can blame it on a panic attack and go back to how things were before. people do all kinds of weird things when they're panicking over stuff, they'll cut you some slack if you ask them to.