what the delta function does is to change the initial conditions for x = d.

for x < d we have a homogeneous ODE with I.C.:

which gives us the solution you already found:

now I'm going to use something called impulse balancing (I'm not sure what's it's formal name), the main idea of this method is that in order for the equality to hold with the delta function on the right side the highest order derivative has to "absorb" the delta function, the following step is to integrate the ODE in the place where there is an impulse:

now because the second derivative is the delta function y itself is the ramp function and therefore it is continues and the integral on ay vanishes:

thus for x > d we have again the same homogeneous equation but with different I.C.:

and

the constant of the positive exponential must be 0 if we want the solution to decay to 0 at infinity thus we are left with:

now applying the seconf I.C. of the derivative (considering x=d as the starting point x=0):

so the final solution is: