I am glad you ended it. I think that we are more susceptible to those kinds of situations when we are feeling low and lonely, so grieving would play into it. It sounds like you may be a bit depressed, which would be natural given the circumstances.
I am sorry about your grandmother's passing