The impulse causes lateral acceleration of the rod and rotation of the rod.
$$ P=m\frac{dv}{dt} \quad \text{for lateral acceleration}$$
$$ P=I\frac{d\omega}{dt} \quad \text{for rotational acceleration}$$
We calculate the net acceleration for each point along the length of the rod and after multiplying that by the density of the rod we get the forces' acting on the rod and calculate the bending moment.
The net acceleration is the difference between linear acceleration and rotational acceleration for each small dx length of the rod. The net acceleration varies linearly from just linear acceleration at the middle of the rod to maximum at the ends of the rod. we calculated the max at the end and build the triangle of net acceleration and hence the load.
$$ \alpha_{net \ x=L/2} =(1/(\rho d_{x_{L/2}}) - \frac{\ L/2}{\rho d_{x_{L/2}} I})P=1/\rho (1-6/L )
)P$$
So we can consider the beam loaded with two triangles of $ \rho(1-6/L)(L/2)(2L/3)P $
I leave the rest to you. Check my arithmetic please.
Note: many have questions on pure linear acceleration and combined rotation and linear acceleration. The reason the impulse P works the same for both cases is that it gets to accomplish more work in case of combined accelerations.