Maybe the two years have been bad for other reasons. I was miserable for most of the first year of our marriage, but it wasn't my husband's fault. We had moved to a very small town over an hour from anywhere bigger, I had so many problems getting a license in this stupid state I had to let go of my CDL, I was jobless for a long time, and I had no friends because this town is one big clique. I got depressed.
OP, he married you for a reason and I'm sure you two still love each other. If you aren't sure why he's so unhappy ask, calmly and without anger. Tell him how bad it makes you feel to hear it all the time.

There definitely could be other reasons, death of a loved one, unemployment, lost a house, just to name a few major things that could make a person miserable. OP should ask him to explain his feelings.

I agree they definitely need to talk about it before jumping to divorce.
My mom and dad read a book when they were first married called "His Needs Her Needs" which helped them understand each other better so they have been able to cater to each other for the 28 years they've been together.
My fiancé and I were on the brink of breaking up and my mom suggested we read that together. We did and talked our problems out and changed our behavior a little bit and we haven't had a problem since. I suggest OP and her husband read the book too!