I am a new pilot who flies out of an uncontrolled field. When I depart and want to ask the controller for the nearby controlled airfield for flight following, should I contact approach or departure, or it does not matter?
Approach and departure are two facets of the same facility, the TRACON, and it doesn't matter which you call, unless you're an IFR aircraft on an active flight plan or you have a flight plan on file that you want to activate.
For flight following, more important than picking between approach and departure frequencies, is to contact the TRACON on the frequency for the airspace that overlies your position.
For example, at Hollister, the TRACON is called "Norcal," and it handles dozens of different sectors, each with its own frequency.
The frequency for approach and departure at Hollister are identical because that frequency is the arrivals frequency for San Jose International Airport (SJC). That's because Hollister is underneath the approach path for SJC, and that's whose radar screen you will pop up on.
What you should do is look up the frequency for your airport (or for a nearby airport) in the A/FD, in Airnav.com, or in your GPS database, and use that. If it has a discrete departure frequency, then you should probably use that, even though its for IFR departures, but for VFR, it doesn't really matter.
I believe that Approach is the correct phraseology. First, have a look at these definitions from the Pilot/Controller Glossary (my emphasis):
APPROACH CONTROL SERVICE- Air traffic control service provided by an approach control facility for arriving and departing VFR/IFR aircraft and, on occasion, en route aircraft.
DEPARTURE CONTROL- A function of an approach control facility providing air traffic control service for departing IFR and, under certain conditions, VFR aircraft.
The AIM 5-2-7 also says that Departure Control is for departing aircraft only:
Departure Control is an approach control function responsible for ensuring separation between departures.
So according to the FAA's definitions, only Approach Control has any responsibility for en route traffic, which includes the scenario you described in your question.
Second, note that the VFR sectional chart always requests en route pilots to contact Approach, not Departure:
FWIW, I was also taught that "Departure" is used only when actually departing a field and that all 'pop-up' communication with the TRACON should use "Approach"; this is in line with the information above.
I don't think it much matters, and at almost all fields, Approach and Departure are on the same frequency.
But to get really precise about it, I think you should consider it from the perspective of the facility you are contacting.
If you are flying towards that facility, you are essentially approaching it (even if your destination is elsewhere), and should talk to Approach.
If you are flying away from that facility, talk to Departure.