Table tennis is a game of technique, timing, and adjustment. When you miss a shot, that means something went wrong with your technique or timing. That means something went wrong with your muscle memory, which includes both the technique and timing. So what should you do to get back and reinforce that muscle memory?
You shadow practice the shot. Immediately after missing, before whatever went wrong has a chance to become part of your muscle memory, do it the right way. Imagine the same incoming ball you just missed against, including its speed, spin, and location. Then shadow practice the shot the way you should have done it, and visualize the ball doing what it was supposed to do, i.e. the perfect shot. This is how you reinforce the correct muscle memory. Put the feel of the miss out of your memory; thinking about it only reinforces in your muscle memory something you don't want reinforced.
This is especially important for beginning and intermediate players, whose muscle memory is not as developed, but advanced players should do this as well to re-enforce the proper muscle memory. Ultimately, this is the goal of the constant practice needed to become a top player - the primary purpose is to develop and reinforce those muscle memories so they'll remember to come out when needed in a match.