I want to prove that if I have two orthonormal basis in a Hilbert space labeled by $$ | \theta \rangle, | E \rangle, $$ then the following relationship should hold: $$ |E\rangle = \left( \frac{dE}{d\theta} \right)^{-1/2} |\theta \rangle ,$$ where $$E = 4 \sin^2 \frac{\theta}{2} $$ are both eigenvalues of a Hamiltonian with respective eigenvalues.
I have an idea of how to prove it, but it's definitely not a formal proof. My idea was to impose the equivalence: $$\delta(\theta - \theta') = \delta (E-E') = \langle \theta | \theta' \rangle = \langle E | E' \rangle .$$
To semplify the notation, let's shift everything: $$E-E' \rightarrow E \quad \quad \quad \theta - \theta' \rightarrow \theta .$$ Then, by the definition of the dirac delta of a function: $$\delta (E(\theta)) = \sum_i \frac{\delta(\theta - \theta_i)}{|E'(\theta_i)|} = \delta (\theta).$$
Now, I don't know how to formally proceed to split this derivative term into its two square roots in order to get the equivalence on top.
For the map to be bijective (monotonic), you might as well choose $E\in [0,2], ~~\theta \in [0,\pi/2]$. You garbled your equivalence, then.
Note $E= 2(1-\cos\theta), \leadsto dE/d\theta= 2\sin\theta$.
You wish to see how the normalizations of the two labels can be harmonized, $$ |E\rangle = c |\theta \rangle ,\\ \langle E | E' \rangle =\delta (E-E')=c~c'\langle \theta | \theta' \rangle = c'~c~\delta(\theta - \theta') , $$ as you have changed the integration measure of the variable labels of your states.
Indeed, for your variables,
$$\delta (E(\theta)-E(\theta')) = \frac{\delta(\theta - \theta')}{|dE(\theta)/d\theta|} = c^2 \delta(\theta - \theta'),\\ \leadsto c=\frac{1}{\sqrt{dE/d\theta}} .$$