I've been taking trazodone for 6 years as an off label prescription for insomnia. I also suffer with OCD, anxiety and depression.
As you may have found it has a sedating effect so for me it worked for a while. However I went through a standard bad patch a few years ago and the response from my gp was to increase the dose to 150mg a night and I have to say this has severely and negatively affected my mental health. I couldn't understand why my mental health kept getting worse and worse with no obvious reason over the past few years and when I finally reflected on what had changed I decided to see if the drug could be partly responsible. I came off it for a few days and lo and behold I felt lighter and less like a sack of potatoes. My insomnia over these few days trial was dreadful yet my psychological and cognitive functioning improved. I wasn't strong enough to keep going with the trial so I went back on them but at half the dose. That was two months ago and I can honestly say that I feel physically better for it.
So my main advice to you is keep an eye on yourself while you're on it. I don't recommend what I've done to others because everyone is different but be mindful of how you're feeling and be aware that these types of medication do have an effect.
I must admit that I'm surprised you've been prescribed this drug for depression and anxiety as it's a very old tricyclic anti depressant (late 1970s early 1980s). Since this drug went on the market there have been a multitude of newer generation drugs to treat depression and anxiety - they belong to a family of drugs called SSRIs. You may want to research these newer drugs and maybe query your doctor's decision to put you on such an old form of anti depressant. I know they are cheaper than SSRIs so maybe your gp has prescribed them due to stretched funding.
Hindsight is a wonderful thing and I wish I'd have been prescribed a different drug for my insomnia. However you may have a different experience to me so please bear that in mind. You might want to Google trazodone and see what others are saying about it but ultimately it's about whether it works for you or not...