Here's Larry's Six-Month Law. If you work hard and improve, and are finally playing at a higher level in practice, you'll generally need to do this for about six months of tournament and practice matches before you'll be able to consistently win at this level in tournaments. During those six months, you'll probably battle closely with players who were much stronger than you until your recent improvement, and occasionally you'll beat one, but mostly you'll lose close matches that, afterwards, you'll swear you should have won - often with good reason.
What's actually happening? The problem you face is that your opponents have played at that level for a much longer period of time, and so are both psychologically and tactically better prepared to win key points than you are, since you are new to that level. You and your opponent may play the same level, but when it's close, the experienced opponent who has been doing this much longer is more confident and knows exactly what to do tactically. He knows what serve to throw at you at the end of each game, how to return your serve, where to place the ball, and he's confident that he can execute the shots needed to win. You don't have this experience, and probably aren't as sure about what to do at the end of each game. Guess who wins most of those key points?
The key thing to understand is that the only thing that now separates you from your opponent is mental. When you miss a shot at a key time, and it's often the same shot you made over and over earlier, it wasn't the physical aspect that messed up, but the mental. Either you weren't confident and so messed up, or you were crossed up tactically and so were fooled into messing up. Learn from your mistakes in these close matches, pay your dues during those six months or so, and it's inevitable you'll start winning. And perhaps, just maybe, you'll be one of those players who doesn't take six months to start winning at your new level.
To reiterate: The key thing to understand is that it's mostly mental. You might as well tell yourself it's all mental, since that's pretty much true. (Here's Dora Kurimay's Table Tennis Sports Psychology page.)