Here is the proof for homogenoious Dirichlet or Neumann boundry contdtions
after seperating we get
So we get
Now multiply this equation by and integrate the equation.
Now integrate the first term by parts with and to get
Now if we have the homogenious condtions mentioned above either
in either case the first term above is equal to zero when evaluated at the end points. So we get
Since both are always non negative the only when this integral can be zero is if
So the seperation constant must be negative in the heat equation.
This can be shown for the mixed and other boundry conditions but it is not as clean. I hope this helps.