What is the mistake in this proof? During a long night without sleep I managed to come up with a proof for a statement I know is false, and for the life of me I cannot figure out what I did wrong. Where is my mistake?

Theorem: Let $f:A\to B$ be any function. There is a bijection from A onto B.
Proof: By contradiction. Assume there is no bijection from A onto B. Consider the statement "If f is a surjection, then f is an injection." This statement is true iff either f is not a surjection or f is an injection (this is material implication). But this statement is false, because if f is a surjection it can't be an injection because there are no bijections. So then the statement "Either f is not a surjections or it is an injection" is false, meaning f is a surjection and not an injection (demorgan). But if f is not an injection then either f is not an injection or it is a surjection. Using material implication again, this is equivalent to the statement "if f is an injection then it is a surjection," which is false because then there would be a bijection. So f is an injection and not a surjection, which is clearly a contradiction.

This is obviously absurd but I'm having trouble thinking straight. Where is my error?

Consider these two statements:

If $f$ is a surjection, then $f$ is an injection.
If $f$ is a surjection, then $f$ is not an injection.

As you noted, your assumption that there are no bijections implies the second statement must be true.  The rest of your reasoning amounts to asserting that only one of the two statements can be true.  But that's not the case.  Both statements are true if the premise, that $f$ is a surjection, is false.  Said symbolically,
$$((P\implies Q)\land(P\implies\lnot Q))\iff \lnot P$$
