The Little Match Girl is a 1937 animated cartoon short that is part of the Color Rhapsodies series. Nominated for an Academy Award, it lost to a Disney cartoon.
This film includes the sad ending without sugar-coating the original Hans Christian Andersen tale as so often happens with his work. I remember crying the first time I read this story. It's online on one short page here.
There is a 1977 Japanese animated version at youtube here. It takes place on Christmas Eve rather than New Year's Eve as in the other one. This ending is also true to the original story.