A former nurse was struggling to care for her dementia-affected husband when she tried to kill him by injecting him with insulin, a Perth court has been told.