By the time you come to study a PhD, you'll probably be quite familiar with the main parts of a typical university (the library, the coffee shop, the student union bar).
Succeeding with PhD research will be a lot easier if you make the most of these facilities (and others). But it's important to be aware of other options for when that research isn't going so well:
Most universities offer some form of counselling support. Such clinics are staffed by trained professionals and are usually free for current students.
These services are appropriate if you're concerned about your general mental health, either as a result of issues relating to your PhD, or due to other circumstances that occur during your time as a doctoral student.
Taking advantage of them may seem like a dramatic step, but it shouldn't be. Universities offer this kind of support because they know students (and staff) need it from time to time - just like everyone else.
Drop-in sessions may be available, or you may be able to register for a specific appointment. Either way, there's no stigma attached to the process. Services will be offered confidentially and will have no negative impact on your PhD progress, or status.
Your student union
Unions exist to look after the needs of all students at a university, including postgraduates and PhD students.
Some may offer counselling and mentoring services, but they can also support you with more specific concerns related to your personal treatment and wellbeing at the university.
Most student unions have dedicated welfare teams, as well as officers elected to prevent discrimination against specific groups of students.
Your union may also be able to assist you with disputes related to your academic progress or performance. This could involve providing advice on formal procedures or providing a representative to accompany you at meetings.
Issues like these are rare, but it's helpful to know where to find support if they do occur.
Exercise won't solve all your PhD problems - unless you're researching for a doctorate in Sports Science (and even then, probably not) - but you might be surprised how helpful it can be to get away from the library / laboratory and clear your head.
Larger universities often have their own sports centres with gym facilities available to students. There may be a small charge for using them, but this is likely to be a lot less than you'd pay elsewhere.
If physical training isn't your thing, don't sweat (literally). There are likely to be other opportunities to relax around 'campus', including theatres, cafes or bars.