First and foremost, choose to be happy if you can. Life can be hard enough as it is anyway, so if you have a choice, smile - inside or out. Make someone else's day. Be the change you want to see in the world. Accept that you will have bad days, deal with them when they come along, and keep moving forward. Life isn't perfect and neither are you, but that doesn't mean either can't be good.
Writing is just another one of those choices. Do it because you enjoy it. Do it because it makes you happy. Do it because you want to and for no other reason than because you like to see your characters come to life and interact together. Take a break if you need to and then come back when you're ready - in writing and in life.
Keep trying. Even the darkest days must end at some point.
Never give up. You'll never know how close you are to success until you get there.
Try not to make mountains out of mole hills and when possible, believe in yourself. You are stronger than you'll probably ever give yourself credit for. Just keep moving forward. Pausing doesn't mean you've failed and moving slowly doesn't mean you aren't making progress.
Lastly - be unapologetically you. "Those who matter don't mind, and those who mind don't matter." - Various
“Courage is not the absence of fear
but rather the judgment that something is more important than fear.”
— The Princess Diaries