That should be up to the judge's discretion. Same way insanity pleas or "crimes of passion" are handled. Personally I don't think it's a valid excuse.
Retrospring uses Markdown for formatting
*italic text*
for italic text
**bold text**
for bold text
[link](https://example.com)
for link