If you miss with the regular attack, then you are still holding the charge, so it wouldn't be dispelled. However, you could house rule that if you miss with the regular attack (miss with the unarmed strike) but would have otherwise hit with a Touch Attack, then the charge goes off (but not the unarmed damage).
Ex:
AC 18
Touch AC 15
Roll to attack with an unarmed strike (while also holding a Shocking Grasp charge), and get a 16. This misses the regular AC, but you still technically "hit" their armor (you just failed to penetrate it). This would then cause the Shocking Grasp charge to go off.