Not wanting to excuse your boss' behaviour AT ALL but I've found that sometimes men in particular can act this way when they don't know how to express other feelings. For example, someone I worked with was very stressed about me leaving (what was he going to do without me??!!) and more often than not expressed this in a negative rather than positive way.

Why don't you turn it around and just think that he's not coping with the idea of having to do without you! Rest up and nurture yourself for the next few weeks.