Earliest I could find was this, which appears to me to be clearly fiction, and certainly doesn't use the framing device of an asylum inmate: https://archive.org/details/sim_harpers-weekly_1898-09-03_42...