Struggling with my job

I'm struggling with my job. I love having LOTS to do all the time. I enjoy having a full to-do list. But lately, my job is just pathetic. I have NOTHING to do all day. I'm getting to the point where I'm actually dreading going to work because I simply feel useless. I've been scolded a few times by my boss for not making 40 hours every week because I tend to come in late and/or leave early because I'm just sitting around!!
I've committed to "working" at this job for just a few more months, but I want out now.
Do I leave? Do I suck it up and stay? Does anyone have any idea why it would be so important for me to put in 40 hours a week if my job is useless??
I just want to feel needed somewhere. Doing nothing all day long makes me feel worthless.