You learn from everyting
Sometimes we do so stupid thinks, and than we can not stop feeling embarrassed ...
The true is we have to think before we act, but sometimes we are thinking we can just get what we want- and that is all about...
If we make choices without thinking we will get in siutations like this....
The main issue is that other pople are involved and they see what you did or hear what you said.
But the true is that you learn form everything that happens , good or bad - and you learn how to handling them!!!
It is not easy everytime, but try to accept that you´re embarrassed and tell the people who know about it.
 
And if it makes you feel better, apologize- but only when it´s necessary!