You mention visiting the south of France from Barcelona. I'm not sure whether you're contemplating day-trips or being away from our apartment for a few nights. If the former, spend some time on the Deutsche Bahn website, checking the travel times for trips by rail. You might also want to take a look at the fares. I used SNCF for the quick look described below, but if you're interested in Spanish regional trains you'd need Renfe.
If you want to see much of southern France, I think you'd do better to spend 2-1/2 or 3 weeks in Barcelona and the rest of the month in France itself. For one thing, you'd probably save substantial money on transportation costs. I looked at fares to Collioure, which is not far from the Spanish border. The lowest one-way fare I found for the period mid-March to mid-April was €40.10. That trip involves a relatively fast train to Perpignan and a slower train back down to Collioure. It's possible you could save some money by taking a slow Spanish train to the border and then a slow French train on to Collioure, but that would make the trip take a lot longer.
Should you decide to base yourself in far-southern France for a week or so, you could do worse than to stay in Perpignan. It is not the most exciting town/city in France, but it is a transportation hub from which (as of 2017) it was possible to travel to a lot of outlying towns for the grand sum of €1, often by bus but occasionally also by train.
The above is not meant to suggest that a month in Barcelona would be a mistake. I love the city and have mused about doing exactly what you're considering (minus the cross-border excursions). One thing I suggest you be cautious about is planning Sunday excursions to less-popular inland destinations. I needed to catch a bus from Ripoll to Olot and then on to Girona in late July. The bus never showed up and I ended up paying for two hotel rooms that night. People in the area told me the buses were not 100% reliable, but that's the only time I ran into a significant problem, though I noticed that my bus from Besalu left 8 minutes early. Schedules can be very thin on Sundays (and holidays), so if your bus doesn't show up, there may be no alternative. (Ripoll's worth visiting, so it was not a bad experience.)
Edited to add: I agree with David and wouldn't want to tie myself down to just two bases in a country the size of Spain unless I traveled to the country often, but I'm thinking you're looking for a more relaxing, live-like-a-local sort of experience rather than a more traditional trip. It will be fine as long as you are aware of the geographical limitations of your planned approach.