How to create recoil that's not instant?

You want to add the recoil instantaneously you just don’t want to apply the recoil directly to pitch, but apply it as rotational velocity. Then you can implement a simple spring system that corrects your aiming direction back towards center. That will give you realistic recoil recovery that will also work with any kind of other forces that can affect the character’s view rotation such as falls, being hit, sprinting, etc.

So every tick you want to add the current rotational velocity and solve/apply the spring forces. Solving the spring equation is pretty simple you just want to make sure you use a decent integration method–midpoint euler is probably good enough, but something like RK4 may give slightly more stable results. The springs will automatically stabilize the view back toward the center in a physically plausible way. You can tune the spring constants and applied forces to get the desired effects.