Further Edit: The case of Clinton v R  NSWCAA 276 succinctly states a line of authority I was previously unaware of (Howie J at 31):
31 This Court has held that extra-curial punishment is a matter that can be taken into account in determining the appropriate sentence to be imposed upon an offender. It can be in the form of retribution meted out by members of the public or injuries suffered by the offender as a result of the commission of the offence: see Silvano v R  NSWCCA 118; 184 A Crim R 593. The issue was most recently considered by this Court in Whybrow v R  NSWCCA 270 where it was held that “multiple serious injuries” suffered by the applicant were relevant to an assessment of the sentence to be imposed upon him for three offences of dangerous driving causing death or grievous bodily harm arising from the motor vehicle accident in which he suffered the injuries.
32 However, when the injuries are inflicted by the victim against whom the offence is being committed, the court is entitled to take into account whether the act that caused the injuries was an unreasonable reaction by the victim to the acts of the offender and the degree of the injury inflicted: Sharpe v R  NSWCCA 255 at  to , see also Alameddine v R  NSWCCA 317. Another relevant factor may be the seriousness of the offending when compared with the punishment inflicted: see the discussion in R v Davidson ex parte A-G (Qld)  QCA 283.
I also neglected to mention that harm to reputation, negative publicity and emotional stress are forms of extra-curial punishment a court is entitled to take into account: see R v Wilhelm  NSWSC 378 for a contemporary example. The principles described in Clinton v R (referred to above) are probably relevant when assessing harm to reputation; an offender who has legitimately lost their standing in the community legitimately through their offending is less deserving of moderation of penalty than an offender whose reputation has been tarnished by inaccruate speculation, innuendo and rumour. The regard in which they were originally held is also probably a relevant consideration, analogising Chappell v Mirror Newspapers  Aust Torts Rep 68942 at 68948.
The harm need not be a direct result of the offending but can also be indirect. In Chaplin v the Queen  VSCA 145, the father of the victim killed in an instance of culpable driving murdered the offender’s mother in revenge. It was held that this was a matter the Court could legitimately take into account on sentencing.
Edit: Some time after this post I was pointed in the direction of R v Hannigan  QCA 40. The case cites many relevant authorities north of the border that I’d overlooked.
And another recent case from the Pineapple State, where the father of a child who had been indecently assaulted took his own revenge on the perpetrator, a fact taken into the Court of Appeal when re-sentencing: R v Davidson  QCA 283.
In some cases it’s very hard to work out what’s relevant to mitigation, and what isn’t.
For example, what about when a person before the Court has been seriously injured in the course of their arrest. Should the fact they have already suffered as a result of their crime lead to a reduction in their penalty?
On one view, the accused is the architect of their own misfortune. If the force used to subdue them was reasonable, it might be argued that they have nobody to blame but themselves. The additional suffering should be irrelevant to the sentence handed down.
Fortunately for the accused, courts have often adopted a different view.
In R v Fletcher (Unreported, Court of Criminal Appeal, 14 February 1980, p4), an appeal on sentence for an armed robbery, Starke J said,
A matter which may be said to operate in favour of [the co-defendant] is that during the actual commission of the crime , while the action was still on, he accidently blew his foot off which will of course be a great disadvantage to him in gaol and for the rest of his life. The question is whether this is a matter proper to be taken into account. I think it is.
The Court of Criminal Appeal reached similar conclusions in The Queen v Barci (1994) 76 A Crim R 103, where the appellant had been shot by police.
There, the Court found,
It is, we think and as the Crown concedes, not a complete answer to say that Barci brought his injuries upon himself. The fact is that these very serious injuries resulted from the commission of the crime itself. For the rest of his life, those injuries will serve as a savage reminder to Barci of his criminality, and as such, they must fairly be regarded as constituting some punishment for that criminality.
Such reasoning does not invariably lead to a reduction in penalty: R v Mavropoulos  SASC 190. It is a matter to be weighed in the development of appropriate sentencing synthesis alongside other relevant considerations: R v Teh (2003) 40 MVR 195.