Being transparent and straightforward is all you need to do here. This goes for virtually every situation where your circumstances have changed and you're reconsidering a past decision. The key element is to explain why you've reconsidered.
In the case of pursuing a rejected job offer, that means:
- acknowledging the reasons you rejected the offer
- explaining why those reasons are no longer valid
- highlighting why you'd now be excited to accept an offer (if it's still open)
The main reason you need to address your reason for changing your mind is that any hiring manager worth their salt will want to be sure that you're happy to accept the job. Hiring and training is expensive and managers expect people to stick around for a while. They generally don't want to hire someone who's not excited about the job or is likely to move on quickly when they find a better position. So if you can address those concerns, you absolutely should.
There are some reasons people have for not accepting an offer that make this harder. For example if you reject an offer because you expected a significantly higher salary, going back to accept it later is going to raise questions. A good reason to give then is that you had the wrong idea of your market value or that you didn't account for a lower cost of living. A bad reason would be that you've since been fired and are now desperate for a job. In a situation like that you may want to come up with alternative reasons even if they might not ring as true.
Of course none of that applies to your situation. How you explain it depends mostly on how comfortable you are with talking about the loss you suffered. A straightforward "I didn't want to leave my partner but he has unfortunately passed away." is fine. So is being more vague and instead referring to ties to your current location, a changing personal situation, losing a family member, ... The only thing you want to avoid is using non-answers that are (stereo) typical of candidates hiding performance issues or being fired. Ultimately this is just very personal so I recommend you find a way to word this that feels right to you. Some people are more comfortable talking about this kind of loss than others and that changes over time so it helps to have a sentence prepared to explain what happened and that either invites or discourages follow-up questions.
So that's the main message you want to bring. When it comes to the window dressing of how to put this all in an email, it's again pretty straightforward:
- open with the usual platitudes,
- explain why you're reaching out: to see if they might still be interested in extending an offer
- explain why you've reconsidered (as per the above)
- close by inviting a response from them via mail or phone as well as acknowledging that you'd understand if they're not able to renew their offer
As part of this I would also recommend mentioning the current COVID-19 situation. You shouldn't assume that every employer has instituted a hiring freeze but you should be prepared for the possibility that they have. Ignoring the elephant in the room isn't a major problem as it really won't impact whether the manager will want to extend an offer, but it shows a bit of extra professional polish and that's never a bad thing.