Basically, 中文 and 汉语 are the same thing. They are interchangeable. Cantonese is one of the dialects. People in Hongkong and Guangdong Province speak Cantonese. People in other cities speak different dialects. All dialects are based on 中文 or 汉语, they just have different pronunciation or tone, in some cases, one dialect includes some unique words that people with different dialect don't use, but those words account for very small part of all Chinese characters.
English speaking countries may not have dialect, it's just that people in different places have different accent. However, in China, you cannot just use "accent" to describe the difference in pronunciation because the difference is too huge. Some dialects sounds like a totally different language. For me, Cantonese sounds like a foreign language to me.