As a native BrE speaker I wouldn't use either of those. I would say:
'This is the best song I've ever heard'
I'm not sure if the two examples you have are grammatically incorrect, as such (I could see those sentences constructed like that - or at least understand what was meant). They just don't seem very idiomatic to me as a BrE speaker.
'This is the best [x] ever!'
Without the 'that I've heard' the second one would be very idiomatic to say in conversation.
best ever [x]
I (personally) wouldn't use this type of phrasing - at least not in speech.
'This [x] is the best ever'
I would phrase it like this (or just 'This is the best ever' if it's understood what this is),
(Again as a native BrE speaker - I'm unsure about other jurisdictions)