Argh. I have confused myself and misled you. Somehow I imagined that ## a^2 + b^2 = c^2 ##, but that does not follow from my own diagram :)
Anyway, I have checked all the steps and the result is good, except for one thing. Because we measure ## d ## downward from the pulley, we ended up the direction downward being positive. But the force of tension is upward, so you must either negate the entire expression for the force of tension, or change the convention and have the upward direction positive, which means changing all the signs at the ## y ## variable.
And then, depending on how you fix that, add or subtract ## mg ## to obtain the net force. It is the net force that you must cast into the form ## -k_e y ## for small values of ##y##.