I don't want to be friends with a coworker who seems lonely and whose parent died in the last year
What is the reason why you would rather not be friends with them.
I do not really trust these types of lonely people.
If that's how you feel, that's fine!  You can like or dislike whomever you want, that's your choice!
It's fine, I can say I don't trust her even if she is my family and also I don't care if you think it's a bad reason.
It is ok to not want to be friends with this person, however your reason seems inconsiderate. Not wanting to be friends with someone because they are lonely does not make a ton of sense. This lonely person sounds like they could really use a friend!