An SNP MSP has announced she will be stepping down at the next election in what she says is the “most difficult decision” she has ever made.