Mathilde is not a real person but a character invented by Maupassant for a purpose. He can do anything he wants with her, since she is not a real human being but only a name and a description on paper. If he had not decided to treat his creation "harshly," his story would not have the powerful impact that it does. We hate to imagine a beautiful young woman being turned into a hag--but things like this are happening to literary characters all the time--and worse! Things like this--and worse--are happening to real people in real life all the time.
Maupassant was not too harsh. His characterization was a spot on representation of a spoiled and impossible to please young wife. Yes there was a certain justifiable harshness and irony in her situation, but this was a catalyst of change for Mathilde who at the end of the story experienced a quiet pride and joy in what she had accomplished.
Let's face it--Mathilde is overly dramatic. Nothing makes her happy, and her pride is constantly in the way of her contentment. Despite her poor circumstances, she is a larger-than-life character. It is therefore not surprising that it takes something so dramatic and drastic to get her attention. What happens to her is harsh; but it is commensurate with her behavior and attitude.
Having lived in Normandy himself as a boy, attending school at Yvetot, Maupassant observed the pettiness and self-serving nature of the Normans. In addition, Guy de Maupassant served in the Naval Ministry of France where he experienced life with the bourgeoise. So, his portrayal of the character of Madame Loisel parallels people with whom he was acquainted.
In addition to his perspective which is formed from personal experience, Guy de Maupassant is a Naturalist; as such, he writes with an objectivity and frankness that is unsympathetic and detached. And, like other Naturalist writers, Maupassant became somewhat pessimistic in his perspectives and choice of characters.
Well, you are going to get a different answer I think from every person that you ask. My own personal reflection is that he is definitely too harsh, but we must remember that this is in perfect keeping with the overall savage black humour of his writing. Certainly it seems that he is setting up Madame Loisel for some form of punishment - note the exaggerated way she is described, grieving "incessantly" over her lot in life and her endless dreaming of a better life certainly do not win her sympathy with the reader, especially as any other woman would not be so fastidious:
All these things, which another woman of her class would not even have noticed, gnawed at her and made her furious. The sight of the little Breton girl who did her humble housework roused in her disconsolate regrets and wild daydreams.
Thus in some ways her punishment is deserving as she is clearly a woman who is so insistent on being satisfied with the good things that she does have and always craves more.
However, when we consider how she is transformed after all of her work, we are made to feel somewhat sorry for her, in spite of all her faults:
Madame Loisel appeared an old woman now. She became heavy, rough, harsh, like one of the poor. Her hair untended, her skirts askew, her hands red, her voice shrill, she even slopped water on her floors and scrubbed them herself.
Her life has become one unceasing experience of drudgery and is a day by day struggle for survival. Thus, when we find out at the end, with customary savage irony, that the necklace was fake anyway, we do feel immense pity for her and consider that Maupassant was rather harsh in his treatment of her.