Go for it. In my current book, I have a sad ending and a somewhat happy outlook. When writing an emotional scene, I tend to get in it pretty good. I just let the emotions flow like a river.
Unfortunately, or rather, thankfully, I don't think I'm emotionally capable of writing a truly sad piece. I mean, I'm too happy a person to write about it. But I think the best feeling is to be able to write something that would move other people to tears.