Well there are a ton of ways to do it, but the easiest IMO in DPP is to get a Murkrow. They appear at a higher level, learn mean look and have immunity to Mespirit's psychic attack. However the best pokemon to do this will always be smeargle in my opinion, spore, mean look, false swipe, and recover. Anyways, get a pokemon that knows Mean Look/Block, got to an area that has 2 routes close together with tall grass. Go back and forth between the routes, stopping to check if mespirit is in your area on the map marker app you get from the poketch company. Once you see it there go to the grass and find it. Mean look it so it can not flee, and do what you would normally do from there. However if the pokemon you have is switched out or faints without baton passing the mean look mespirit can flee. If you use a quick ball, use it turn one-five with a 4x catch rate, after every 5 turns it goes down to 3x, 2x, etc. After that use dusk ball at night or ultra balls will work somewhat well during the day.
Hope this helps, oh and here
is a reallllly annoying guys video on how he did it.