dealing with depressive partner???

i love my partner and i want to understand every part of him but i feel like i fall short when he has episodes. i feel like i don’t reassure him enough and give him the answers he’s looking or i make things worse. he’s usually fine when he takes his medicine, it’s not that bad. but when he doesn’t take his medicine, things become a little hard. i don’t want to lose him and i want him to feel validated and seen. sometimes he’ll shut down and not wanna talk but i’m dealing with really bad anxiety and i start to think bad things but i feel like i can’t say anything because i don’t want to make things worse. what can i do to help him??