I have the same problem as you right now. Long break from work during the pandemic, joined a new company, and have only managed to merge one tiny PR in my first month. It feels terrible.
What I’ve figured out is that I need to have a new way to measure myself. I wanted to be a hotshot from day one, and impress everyone by cranking out new features. But on a project this complex, it will take half a year to ramp up and become an important part of the team.
In the meantime, I’ve realized I can’t simply call myself a failure every day. I need to find smaller goals that I measure myself against, like learning a new part of the codebase, building a relationship with another developer, building a little prototype that might not get used, and so on.