Tore both of mine. One 15 yrs ago doing the standing single leg curl machine for low reps heavy weight and the other playing softball 25 yrs ago. The softball tear only slight black and blue but the other one was major black and blue and diagnosed with a pretty bad tear.
What I did was as soon as possible start working the hamstrings with very high rep light weight low intensity. I wanted to get as much blood into the area as possible to heal. I would also constantly stretch with the intention of not healing up or having scar tissue glue me so to speak in a shortened range of motion.
I eventually healed and can train hams fairly heavy, ie, maxed RDL's for 3 x 385. But every now and then I do feel pulling in the injured areas especially if I'm a little dehydrated from dieting or something which gets a little scary like I'm about to tear it again.
Each injury took me at least a year or more to get back to intense type training and even then things were still iffy. So depending on severity of tear (and yours doesn't sound too bad) it could take some time to recover and heal.