fucked up my relationship

I fucked up by messaging his family when they never talked him to him. He forgave me. We now hit a rough patch in our relationship cause I lost my job and he is barley working so we have little to no money. it has been mostly him covering everything the last 5 months. but when we lived in the previous town i was covering everything myself. well he told his mom about it all and she then (hated me since day 1) decided to read all the messages to him, which I honestly do forget what I sent but now he is wanting to leave me for good cause of that (happened over 7 months ago and haven't done it since) and not being able to find a job. I don't want to lose him. I know I fucked up but so has he. I don't want to loose this relationship.. We been together almost 4 years too. EDIT: we have been trying to work on our selfs and the relationship but whenever his mom comes into the picture it messes it up. shes the type of person who wants no one to be happy when she is not happy. and he has not said he hates me. He says he does still love me but it's hard to forgive me after seeing the messages. I also feel so shitty and guilty about it that I do want to end my life but I am trying to not do that.