Effect of seclusion on mental health status in hospitalized psychiatric populations: a trial emulation using observational data