Please help, I'm pretty sure these are two stories and hosted on AO3. The first is a very long, detailed and angsty accounting of Mary shooting Sherlock, his recovery, and the fallout. I remember there are a few illustrations and Sherlock spends a lot of time in his Mind Palace with Moriarty, and sometimes Molly, fighting his way back to consciousness. He gets better but has major relapses two or three times. The main doctor is an older gentleman and at first thinks John and Sherlock are married. He consults John about Sherlock's chances and his treatments and things. There's a part about being trapped in his Mind Palace and looking out through the windows and it's raining which means that John is crying. John is really broken down by Sherlock's setbacks and Mary tries to help, but he's really conflicted. John decides in the end that he can't choose between them and Sherlock says that's fine and so does Mary.
In the sequel Mary is murdered during a lunch date with John at a cafe as they wait for Sherlock to arrive. The shooting is another in a series of "random" murders, but Sherlock figures out that Magnussen set up a plan to avenge himself on retired women assassins in case he was ever killed. Lady Smallwood and another woman whose identity was acquired later in life (like Mary's) were the previous victims. Mycroft tells him not to go after the assassin to look after John who is completely losing it pyschologically - having lost his wife and daughter and was already weakened by months of dealing with Sherlock's setbacks. He's suicidal. Mycroft convinces John to check into a mental hospital because Sherlock isn't well enough to care for him, but that's a disaster. Sherlock brings him home and they commit to being well together. The doctor from the first story has become a friend and also wants to help.
The first story is very long. The second is a WiP I think. I'm hoping someone can point me in the right direction as I'd like to read them again. Thanks!