A vulnerable young mother killed herself after leaving a note claiming “I was murdered” after suffering years of alleged abuse by her ex-boyfriend, a court has heard.