Hey there, good days and bad days are normal. It's all a part of life. The fact you have those days where confidence radiates of yourself is a good thing. It shows you can appreciate yourself, who you are, and what you look like. It's always importatn that you are happy with yourself even if no-one else is.
As for the bad days, you need to ask yourself why you're feeling that way on those days. Is something different from the days where you feel like you are confident, can do anything? If you can spot it. Try and change it. Only actively confronting such a thing can change it. Ignoring it will do absolutely nothing at all.
As for not dancing with anybody at the formal, what's so wrong with that? It wasn't your original intentions to go so it's not like you would have asked anyone. You can have fun by mingling with the crowd.
don't let one night affect those days you do have that are full of confidence =]
-------
From a distance you look like my friend,
even though we are at war.