I've not been in your ex's position, OP, but I have a close friend and a late aunt who loosely have been (plus know others who have had addiction in their lives).
I think whether to write, thinking of my dear friend and late aunt, would depend for me upon what being a 'terrible boyfriend' looked like.
My friend's late ex sounded like a lovely man prior to his alcoholism but once it took hold, it was the death of him. A relationship was untenable. He lied, appropriated joint money to buy drink, endlessly covered up his drinking and spending, let her down and terrified her by doing things like having fits or coming home drunk having driven himself when she had hidden the keys. Of course this was not a viable relationship and it put her through hell. However, he did not, for instance, verbally or physically abuse her, cheat, get into fights, or things like that. He wasn't a violent or abusive drunk, his addiction had just gone way too far.
My aunt's ex, on the other hand, verbally, physically, and I believe, sexually abused her and the children while drunk.
I know my friend would have appreciated a letter from her ex before he died, acknowledging her pain and his own demons, as long as it was asking for nothing.
I can't speak for my aunt but genuinely think that such a letter to my cousins from their father would have been far less well received. In fact, I think it would have made them angry, raking up all he had put them through when they have no opportunity to hold him to account.
Not sure if this helps but either way, I wish you luck with finding a transplant.