Both are grammatical, but the former makes better sense. If you are afraid to do something, it means that fear prevents you from doing it. To me, "afraid of showing your emotions" sounds like there is something in the process of showing your emotions that scares you.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.