It is a good paraphrase of the do unto others what you would have them do unto you. (Which is awkward eh?)
Unfortunately, many mentally ill people don't respond the same way, even if you leave them alone wishing for the same.
But at least if you do your best, then you can have no regrets and no confessions of guilt to make.