For what it is worth, I think you made the correct choice. Family always wins.

If the boss didn't understand that, you didn't want to work there anyway.

However, that doesn't make the firing illegal.

You also didn't mention whether you had any time remaining, how many sick/personal days you had already taken or any other facts.

Sometimes, you just have to live with what happens to you. As I tell my children, don't take your own life too seriously.