It's not a mess! It's all good! You knew you'd had to come out at some point and maybe this is your chance! Eventually you have to face hats going I happen whether it be negative or positive results. Why not get it over with right?? I'm sure your parents love and care a lot about you therefore they aren't going to hate you or be mad. They may be a little frustrated and confused but they will still love you no matter what. The same for your friends(if they are true friends.)Also, on the surgery thing if the surgery will make you feel better about yourself and make you happier I don't see any problem with getting it! Also, I believe you should either see a therapist or maybe just talk to a close friend or family member that you really and truely trust about your problems! Message me if you ever need anything at anytime!!
good luck