What is the default function for a play/pause media key?
It appears that there is a Gist on GitHub using USB Overdrive and a Windows Keyboard that addresses how to map the media keys the way you want to. Configure media keys on a non-Apple keyboard to control Spotify via AppleScript and USB Overdrive on OSX.

If you scroll down to ludalex addition to the Gist, they have added an Applescript that can identify either iTunes or Spotify and assign the Play/Pause key press to the correct app.