I have just started a first-year calculus-based physics course about electromagnetism and waves. I am having trouble understanding what calculus notation means in the context of physics. Here is a paraphrased example from Fundamentals of Physics 9th ed. by Halliday et al. that considers finding the electric field at point P (refer to the figure below):
Let $ds$ be the arc length of any "differential" element of the ring. $dq=\lambda~ds$ is the total charge of the ring, where $\lambda$ is linear charge density. The magnitude of the field is given by
$$dE=\frac{1}{4\pi\epsilon_0}\frac{dq}{r^2}=\frac{1}{4\pi\epsilon_0}\frac{\lambda~ds}{r^2}$$
Since the x-components of the field are balanced at point P, after the application of geometry, the equation becomes
$$dE\cos{\theta}=\frac{z\lambda}{4\pi\epsilon_0 (z^2+R^2)^{3/2}}ds$$
The author then puts an integral sign in front of both sides and integrates around the circumference of the ring: $$E=\int dE~\cos{\theta} = \frac{z\lambda}{4\pi\epsilon_0 (z^2+R^2)^{3/2}}\int_0^{2\pi R}ds =\frac{z\lambda(2\pi R)}{4\pi\epsilon_0 (z^2+R^2)^{3/2}}$$
In math, I was taught that Leibniz's notation ($dy/dx$) is not a fraction. After a little bit of research, I found that it sometimes acts as a fraction, even though it is not a fraction when defined with limits. Nevertheless, what should I think of when I see $dq$, $ds$, and $dE$? What does "differential" mean as used in the text above? So far it has made sense for me to think of $dq$ as an "infinitesimal" charge (for example), even though I was taught calculus using limits (I know very little about infinitesimals).
Secondly, the way the integral is taken seems informal and confuses me. I understand that it represents the sum of the electric field caused by all the charge around the ring, but how can you just put an integral sign in front of both sides and take the integral with respect to whatever $dE$ or $ds$ that happens to be there? Also, the integral on the left side is indefinite whilst the one on the right is definite. How should I view this kind of material?

I am unsure if this question belongs on the math stack exchange or this one.