I like Só leigheas ideas about doing something that motivates you first. You are the one who knows what motivates you. Do that!
On the other hand it is important to understand that depression is a real illness where among others thinking may be slowed down. Slowed down thinking may have influence on your capacity to write. My experience with depression is that it is best to try to make a routine for out of bed time, meals, physical exercises and more. May be you can have a special time a day when you can try to write.
If you are so depressed that you cannot get out of bed, you can start with sitting in your bed the first day, putting one foot on the floor the next and so on.
Since you are asking about motivation to write, I am sure you have passed the "out of bed stage", but the principle is the same for every thing you want to do: take it slow, one step at the time.
Links to motivation. Hope you find something that inspires you (there are 75 items):
https://www.2knowmyself.com/directory/28
Please remember: The worst you can do is to start blaming yourself for not being good enough. If you try different ways to be able to write and have no successes, please find something else to fill your time with until you become better.
Good luck!