Loss of libido is a symptom of depression. That's something you might want to get checked out. Taking an antidepressant can also worsen the problem, but in some cases can improve things.
The problem with depression is that there's a tendency to go straight onto an antidepressant, normally an SSRI like Setraline. These are cheap, and reasonably effective, but the side effects can be problematic, and it can take time to dial in the right drug at the right dose to manage your symptoms.
Starting an antidepressant can be rough. I felt worse for the first few weeks than I was before I began treatment.
Coming off an antidepressant can be rough. I was taking a relatively low dose of Setraline, but decided (in consultation with my doctor) that it wasn't really being helpful. So I tapered for a few weeks, and stopped about ten days ago. For most of that time I've had head-aches, dizziness, and other flu-like symptoms.
If depression and anxiety are ruining your life then it might be worth investigating, but it's really a call you need to make with a professional, rather than an anonymous contributor on a forum.