You are missing .... topology.
Consider the function $\dfrac{1}{z}$ on $\mathbb{C}\setminus \{0\}$. This function is holomorphic on the domain.
Formally its antiderivative should be $\ln(z)$. However, we have a problem actually defining this function, since if you take a small circle $\gamma$ that encapsulates the origin and integrate $\dfrac{1}{z}$ around $\gamma$, you get a non-zero value.
(In other words, is is not the regularity that kills you, but the fact that you can't even necessarily define a global anti-derivative. I suspect when your book talks about analytic functions having anti-derivatives they are taking this from a very local point of view.)
You forgot to check $F$ is well-defined since it is apparently dependent on the path you choose. First of all cover $\Omega$ by open balls. We shall show there exists a primitive on each ball.
Let $B(z_0,R)$ be a ball. For $z\in B(z_0,R)$, choose the radial path from $z_0$ to $z$, call that $\gamma_z$.
Next define $$F(z)=\int_{\gamma_z}f(\xi)d\xi$$
Then we observe that for $h$ small, $$\frac{1}{h}[F(z+h)-F(z)]=\frac{1}{h}\int_{L(z,z+h)}f(\xi)d\xi$$by Gousrat Theorem where $L(z,z+h)$ is the straight line joining $z$ to $z+h$
Then we get $$\frac{1}{h}[F(z+h)-F(z)]=\frac{1}{h}\int_0^1f(z+\theta h)hd\theta=\int_0^1f(z+\theta h)d\theta \rightarrow f(z)$$as $h\rightarrow 0$ by your favourite convergence theorem.
Thus we have showed the existence of an anti-derivative on an open ball.
This in particular shows that integral of a holomorphic function on a closed curve in any open ball is 0.
Now let $H$ be a fixed end point homotopy between two paths $\gamma_0,\gamma_1$ in a region $\Omega$
Say $H: I^2\rightarrow \Omega$
Choose a partition of $I^2$ into a grid $\{G_{ij}\}$ so that any small tile $G_{ij}$ falls into an open ball in $\Omega$ via $H$ using continuity and compactness. Join the corners of the tiles in $\Omega$ by straight lines and for the sake of simplicity call them $G_{ij}$ as well.
Then one can write $$\int_{\gamma_0}f(\xi)d\xi -\int_{\gamma_1}f(\xi)d\xi =\sum_{i,j}\int_{\partial G_{ij}} f(\xi) d\xi $$
Each term in the last sum is $0$ as it is the integral of a holomorphic function on an open ball by our choice of the partition.
This shows integral of a holomorphic function on 2 fixed end-point homotopic curves is the same. In particular this shows integral of a holomorphic function on a closed curve in any simply-connected domain is 0.
Then you can proceed as you were doing.
If you are interested in a purely algebraic topology approach, here's one way to proceed.
We have solved the primitive problem locally an open cover say balls $\mathcal B=\{ B_i\}$. Any $2$ such solutions on a ball differ by a constant. Say we fix a local solution $\{f_i \}_i$ on the local cover $B_i$
Then on the intersection $B_i\cap B_j$ we get a complex number $c_{ij}$ such $f_i-f_j=c_{ij}$. Thus we get a co-cycle in the Cech cohomology group $\hat {H^1}(\Omega ;\mathcal B)$
The cover we chose was a Leray cover as intersections of convex sets are convex and hence all contractible. So the obstruction is an element of $\hat{H^1}(\Omega; \mathbb C)\cong {H_{dR}^1}(\Omega; \mathbb C)$
For simply-connected smooth manifolds, the $1$st de-Rham cohomology group is $0$ and hence we get the obstruction we got isn't an obstruction at all.
Best Answer
We are going to show that $f'(z_0)={1\over z_0}$ for $z_0\notin (-\infty,0].$ To this end we need to prove $$\lim_{z\to z_0}{f(z)-f(z_0)\over z-z_0}={1\over z_0}$$ Let $d={\rm dist}(z_0,(-\infty, 0])=\displaystyle \min_{t\le 0}|z_0-t|.$ Assume $|z-z_0|<{d\over 2}.$ Then $z\notin (-\infty, 0].$ Intuitively, it means that if $z$ is close to $z_0,$ then $z$ does not belong to $(-\infty, 0].$ Observe (by drawing a picture) that the line segment $[z_0,z]$ connecting $z_0$ and $z$ does not intersect the half-line $(-\infty, 0].$ More precisely, the distance of every point $w$ in this segment to $(-\infty, 0]$ is greater than ${d\over 2}.$
While calculating the derivative we can restrict to $z$ close to $z_0,$ for example to $|z-z_0|<{d\over 2}.$ Let $z=x+iy$ and $z_0=x_0+iy_0.$ By definition $$f(z)-f(z_0)=\int\limits_{\gamma_z}{1\over w}\,dw -\int\limits_{\gamma_{z_0}}{1\over w}\,dw =\int\limits_{\gamma_{z_0,z}}{1\over w}\,dw$$ where $\gamma_{z_0,z}$ consists of three line segments: the first one from $z_0$ to $1+iy_0,$ the second one from $1+iy_0$ to $1+iy$ and the third one from $1+iy$ to $z.$ As the function ${1\over w}$ is holomorphic in the domain, the integrals over $\gamma_{z_0,z}$ and the line segment $[z_0,z]$ are equal, as the region between them does not intersect $(-\infty,0]$ (again the picture could be helpful). Therefore $$f(z)-f(z_0)=\int\limits_{[z_0,z]}{1\over w}\,dw$$ As $z$ is an antiderivative of $1$ we get $$z-z_0=\int\limits_{[z_0,z]}\,dw$$ hence $${1\over z_0}={1\over z-z_0}\int\limits_{[z_0,z]}{1\over z_0}\,dw$$ Furthermore $${f(z)-f(z_0)\over z-z_0}-{1\over z_0}={1\over z-z_0}\int\limits_{[z_0,z]}\left [{1\over w}-{1\over z_0}\right ]\,dw$$ We obtain $$\left |{f(z)-f(z_0)\over z-z_0}-{1\over z_0}\right |\le {1\over |z-z_0|} l([z_0,z])\max_{w\in [z_0,z]}{|w-z_0| \over |w|\,|z_0|}$$ Observe that the length $l([z_0,z])$ is equal $|z-z_0|$ and that $|w-z_0|\le |z-z_0|$ for $w\in [z_0,z].$ Moreover as the distance of $w$ to $(-\infty, 0]$ is greater than ${d\over 2},$ we get $|w|\ge {d\over 2}.$ Summarizing we obtain $$ \left |{f(z)-f(z_0)\over z-z_0}-{1\over z_0}\right |\le {2|z-z_0|\over d|z_0|}$$ Therefore $f'(z)={1\over z}$ for any $z\notin (-\infty, 0].$ Hence the function $f(z)$ is holomorphic.
Remark