help?

i am 168 cm tall (or there bouts) and weigh 53.3 kg.
i have started going to the gym as i recently discovered i had gained 2 kg.
i am considering weight-loss pills but they scare me, this whole sudden obsession with my weight scares me. It only started when i became vegetarian and was watching my weight so i don’t get sick, but even now (when i’m not vegetarian) i’m still watching it.
i have this goal/idea in my head that if i weigh 49 kg i will be better, i will have more confidence and suddenly be happy.
does this sound incredibly stupid? or lame?
do i need help?
is weight-loss pills the right thing?
i am too scared to talk to a doctor or my parents so i’m hoping this will help.