boyfriend trouble

so i just got these messages from my boyfriend of almost 2 years and he said he hasnt been happy for more than a year and so i dont know how to respond to these messages and i dont know if im responding correctly. so I'm posting this to see if anyone can help me out. I'm freaking out roght now because I'm scared.