Fox: Katy Perry 'struggled for months' to release vulnerable new song about failed romance