Value of a discontinuous function at the discontinuity Although this is a maths related question, it is important that the answer physically makes sense, so I'm posting it here. (Btw. the problem is related to stochastic thermodynamics, and I'm using definitions from (Seifert, 2012).)
I have a potential \begin{equation}V(\lambda,x)=\frac{(x-\lambda)^2}{2}\end{equation} where $\lambda$ is an externally controllable parameter and $x$ is the position. (Both potentially time dependent.) I want to find the work done externally in the time interval $t\in[0,1]$, defined as \begin{equation}W=\int_0^{1}\text{d}t'\frac{\partial V}{\partial \lambda}\frac{\text{d}\lambda}{\text{d}t'}\end{equation} when the control parameter is abruptly switched at $t=1/2$ from $0$ to $1$, i.e. \begin{equation}\lambda(t)=\Theta(t-1/2),\end{equation} where $\Theta(t)$ is the Heaviside theta function. This gives \begin{equation}W=\int_{0}^{1} \left[\lambda(t')-x(t')\right]\delta(t'-1/2) \text{d}t'=\lambda(1/2)-x(1/2).\end{equation} Now the problem is, that $\lambda(1/2)$ seems to be undefined, or its definition depends on convention, and it can be taken to be $0$, $1/2$, $1$ or really any number between these. What makes sense to use from a physics perspective?
 A: There is no single obvious value for $\Theta(0)$. When you encounter this kind of problem with distributions, it means the way that mathematical tool has been used is inadequate and one must think more about the physics model to find whether definite answer can be found. Sometimes, function undefined at some point, such as $\Theta$ at 0, can be completed by average of the left-hand and right-hand limit or in other way, based on some physical argument. In other cases, it is better to discard the calculation and get back to thinking about how to obtain definite result in other way.
Your integral formula for $W$ suggests it is assumed no change in $x$ happens in the time interval considered. So the process is that potential function undergoes quick displacement, while the particle does not. Also, the change of $\lambda$ is done in short time interval far from reaching the interval limits $[0;1]$, so all change of potential energy should count as part of the work.
So, given the simplicity of this process, why not calculate the change of energy even more simply as difference of energies for the same $x$?
$$
W = V(after~change) - V(before~change)  =
$$
$$
W = V(x, 1) - V(x, 0) =
$$
$$
W = \frac{(x-1)^2}{2} - \frac{(x-0)^2}{2} = \frac{1}{2}(-1)(2x-1) = \frac{1}{2} -x.
$$
So, the question has definite answer, and nowhere did we have to speculate on what the value of $\lambda(1/2)$ is.
A: A standard representation of the Dirac delta function is as a sequence of functions of the form
$$\delta_\sigma(x) = \frac{1}{\sqrt{2\pi}\sigma} e^{-x^2/(2\sigma^2)},$$
where we take the limit $\sigma\rightarrow 0$ in some regular way.
(A typical choice is $\sigma=1/\sqrt{2n}$, where $n$ is a natural number and we take the limit as $n\rightarrow\infty$.)
With this representation
$\Theta(0) = 1/2$.
In fact, this is true for any of the symmetric representations of $\delta$. 
Whether this makes sense for your problem depends on the typical form of $\lambda$.
If it makes sense that $\lambda$ ``turns on'' in a symmetric way about $t=1/2$, then it is natural for $\Theta(0)$ to be $1/2$.
Addendum
The delta sequence at the end of this answer is an alternative with $\Theta(0)=0$. 
