Losing confidence after a series of paper rejections
This sounds like a pretty common case of the human condition.  In my single days, I used to think of dating like &quot;strikes and gutter balls&quot;.  That is, either I was getting many dates in rapid succession or going through a prolonged dry spell.  In the former, I was feeling pretty good about myself and was quite down in the latter.
In my current research days, I find a similar emotional oscillation.  This is the nature of research, in my opinion, and it builds character.  You actually sound quite productive, and the results will come.  In fact, I would encourage you to try to get more enjoyment from the process of seeking truth rather than putting all your eggs on the often opaque 'accept/reject' decision.  If I may with another analogy, it's like learning golf.  It's a slew of mishits, duffs, shanks, slices, hooks, flubs, and ineptitude until suddenly you smash a beauty down the fairway and are the envy of your friends.  If the one great shot makes up for the many bad shots, you're hooked.  If not, you're probably going to quit.
Also, pragmatic advice holds: get sleep, review diet, practice self-care, take mental health breaks, seek advice from colleagues/advisors, confirm writing and presentation adequately represents results, etc.