It seems like it could make sense in a desperate situation.
Edit: convicts
The use of "punishment batallions" by both Nazi Germany and the USSR during the Second World War was fairly common. Called straf or shtraf battalions (Strafbataillon and штрафбат) respectively, they were manned by men, usually disobedient or insubordinate soldiers, who were to repay their crimes through hard labour and dangerous details in the service of the military, in some cases, by walking across a minefield before an advance. If you've ever seen the 1993 version of "Stalingrad," you'll see it from the German side.
An additional, individualized example would be that of German writer Wolfgang Borchert, who was sent to the front multiple times after his discharge, in punishment for his seditious and "defeatist" attitudes and performances as an actor in civilian life.
Sources: University courses on the USSR and WW2, German Literature classes, and the Film "Stalingrad" (which anyone interested in the battle really should watch).
Classic texts on the Spring and Autumn Period (whether these are 'history' or 'legend' doesn't take away from the influence of the story) hold that Goujian, King of Yue, rounded up convicts to lead the front lines in battles against the State of Wu in the 5th century BCE. Taken out of their dungeons and offered a last, decent meal, upon reaching the Wu positions they all slit their own throats in order to wig out the enemy. There's controversy over whether they were actually convicts or just soldiers super-stoked about Yue, as well as if they were slitting their throats or hardcore enough to be cutting off their own heads, but the suicide thing and this rather intense application of psychological warfare is all definitely on the record.