Right, that's why it is not defined mathematically the way you sketch. The proper way to define a Schroedinger equation with a delta function potential is via self-adjoint extensions as already described by von Neumann in his mathematical foundations of quantum mechanics.
Basically you just specify the boundary conditions of the wavefunction. In the case of one dimensional Schroedinger equations, not all possibilities can be realized as limits of smooth potentials, especially the so-called delta' interaction.
See Coutinho et al, Generalized point interactions in one-dimensional quantum mechanics,
http://iopscience.iop.org/0305-4470/30/11/021