It is indeed a euphemistic or 'minced oath' version of "God love me" - with the verb, here, in the optative mood ("may God love me" or "as I hope God loves me") to invoke the Deity as guarantor of the speaker's sincerity. An analogue is "corblimey" < "God blame me", that is, May God impute sin to me (if I'm not speaking the truth).
- ADDED, 3/14/17: An anonymous reviewer suggests that blimey derives from blind me. That seems equally likely, and appears to be the sense in which the word was understood by late 19th-century observers.
It's 'cockney' in the broad sense of 'colloquial lower-class British', but it's not restricted to the area within earshot of Bow Bells and it's not rhyming slang.
The New Partridge Dictionary of Slang and Unconventional English (2008) says:
have a cow to become emotionally overwrought; to lose control US, 1966.
Speaking of Animals: A Dictionary of Animal Metaphors (1995) by Robert Allen Palmatier says:
HAVE A COW to have a cow. To have an anxiety attack. Source: COW. WNNCD: O.E. On the TV show "The Simpsons," Bart Simpson says "Don't have a cow, man!" meaning "Don't get all upset about it." Bart is likening an anxiety attack to giving birth to a cow - a frightening thought. Normally cows are the ones that give birth to cows - i.e., bull calves and heifer calves. Compare Have Kittens.
WNNCD is Webster's Ninth New Collegiate Dictionary (1983) and O.E. means Old English, but the O.E. must apply to the plain word cow rather than the phrase. (The OED dates cow to Old English.)
This Yahoo Voices article - Idioms Unpacked: "Don't Have a Cow" - also claims it means to (not) give birth to a cow, which would be distressing for a human to do. It lists a number of references at the end, but I've not followed them.
A quick search of Google Books shows this snippet dated 1962 from Field and Stream, Volume 67:
"Oh, don't have a cow," Chip said confidently. "They just haven't begun to fly yet."
"If they don't fly soon," Andy insisted, "they're going to need landing lights."
(Care must be taken with Google Books' snippets as they're often mislabelled, but following the story text we find an advert for a "NEW 1963 book of homes", so it's likely from 1962 or 1963.)
Searching Subzin.com, the first film I found to use the phrase was Sixteen Candles (1984):
00:39:00 I don't know, Jake.
00:39:02 I'm getting strange signals. Well, they're not comin' from me.
00:39:05 Everything's fine. Don't have a cow.
00:39:08 Okay.
00:39:10 Just remember one thing.
Edit: Good timing, as the OED have just released an update to the dictionary containing the phrase for the first time. The first quotation is from a 1959 newspaper:
1959 Denton (Texas) Record-Chron. 26 Mar. 3/2
He won't let me watch rock 'n roll shows... He'd
have a cow if he knew I watched 77 Sunset Strip.
Best Answer
I believe this is a variation of "Here we go!" where you're expecting a negative result, especially if you've nothing to lose you might as well have a punt.
The oldest "here goes nothing" I can find is from 1889's Fibre & Fabric:
However, there are earlier variants.
1875's Gulliver's travels into several remote nations of the world has:
And 1885's Blackwood's Edinburgh magazine: